From 2222dbb47e42d9518330cda6b6d5a2e2be308c2f Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 5 Jul 2018 11:39:15 +0100 Subject: [PATCH] Switch to stestr According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. While we're at it, we also fix the docs requirements and removed the unused 'pypy' and 'cover' tox targets. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: I424068adc9092be2cf40d117c9dc4e92bb51e804 Signed-off-by: Stephen Finucane --- .gitignore | 2 +- .stestr.conf | 3 +++ .testr.conf | 4 ---- doc/requirements.txt | 3 +++ lower-constraints.txt | 2 +- setup.cfg | 4 ---- test-requirements.txt | 11 +++++------ tox.ini | 20 ++++++-------------- 8 files changed, 19 insertions(+), 30 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf create mode 100644 doc/requirements.txt diff --git a/.gitignore b/.gitignore index 85fc185c..eaebb3ee 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ develop-eggs .installed.cfg # Other -.testrepository +.stestr/ .tox .venv .*.swp diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..a2bf94ed --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./pbr/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index b3cfc54a..00000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..b9c5e1f1 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +openstackdocstheme>=1.18.1 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 diff --git a/lower-constraints.txt b/lower-constraints.txt index fefbe45e..44956cef 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -1,6 +1,5 @@ alabaster==0.7.10 Babel==2.3.4 -coverage==4.0 docutils==0.11 dulwich==0.15.0 extras==1.0.0 @@ -27,6 +26,7 @@ six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.0.1 +stestr==2.0.0 testrepository==0.0.18 testresources==2.0.0 testscenarios==0.4 diff --git a/setup.cfg b/setup.cfg index d030b628..bd65299e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,10 +32,6 @@ classifier = packages = pbr -[global] -setup-hooks = - pbr.hooks.setup_hook - [pbr] autodoc_tree_index_modules = True autodoc_tree_excludes = diff --git a/test-requirements.txt b/test-requirements.txt index de914907..8fdcb839 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,17 +1,16 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 mock>=2.0.0 # BSD -python-subunit>=1.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 six>=1.10.0 # MIT -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT virtualenv>=14.0.6 # MIT + +# optionally exposed by distutils commands +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +testrepository>=0.0.18 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 43410077..cf27d987 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,15 @@ [tox] minversion = 2.0 -envlist = py35,py36,py27,pypy,pep8,docs +envlist = py{27,35,36},pep8,docs [testenv] usedevelop = True install_command = pip install {opts} {packages} passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} - -r{toxinidir}/test-requirements.txt -commands = - python setup.py test --testr-args='{posargs}' - -[tox:jenkins] -sitepackages = True + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/test-requirements.txt +commands = stestr run {posargs} [testenv:pep8] basepython = python3 @@ -21,19 +17,16 @@ commands = flake8 {posargs} [testenv:docs] basepython = python3 +deps = -r{toxinidir}/doc/requirements.txt commands = python setup.py build_sphinx [testenv:releasenotes] basepython = python3 +deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf releasenotes/build sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html -[testenv:cover] -basepython = python3 -commands = - python setup.py test --coverage - [testenv:venv] basepython = python3 commands = {posargs} @@ -51,4 +44,3 @@ basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -