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 <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2018-07-05 11:39:15 +01:00
parent 915e62ef7b
commit 2222dbb47e
8 changed files with 19 additions and 30 deletions

2
.gitignore vendored
View File

@ -24,7 +24,7 @@ develop-eggs
.installed.cfg .installed.cfg
# Other # Other
.testrepository .stestr/
.tox .tox
.venv .venv
.*.swp .*.swp

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./pbr/tests
top_dir=./

View File

@ -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

3
doc/requirements.txt Normal file
View File

@ -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

View File

@ -1,6 +1,5 @@
alabaster==0.7.10 alabaster==0.7.10
Babel==2.3.4 Babel==2.3.4
coverage==4.0
docutils==0.11 docutils==0.11
dulwich==0.15.0 dulwich==0.15.0
extras==1.0.0 extras==1.0.0
@ -27,6 +26,7 @@ six==1.10.0
snowballstemmer==1.2.1 snowballstemmer==1.2.1
Sphinx==1.6.5 Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1 sphinxcontrib-websupport==1.0.1
stestr==2.0.0
testrepository==0.0.18 testrepository==0.0.18
testresources==2.0.0 testresources==2.0.0
testscenarios==0.4 testscenarios==0.4

View File

@ -32,10 +32,6 @@ classifier =
packages = packages =
pbr pbr
[global]
setup-hooks =
pbr.hooks.setup_hook
[pbr] [pbr]
autodoc_tree_index_modules = True autodoc_tree_index_modules = True
autodoc_tree_excludes = autodoc_tree_excludes =

View File

@ -1,17 +1,16 @@
# The order of packages is significant, because pip processes them in the order # 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 # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # 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 fixtures>=3.0.0 # Apache-2.0/BSD
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
mock>=2.0.0 # BSD 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 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 testresources>=2.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
virtualenv>=14.0.6 # 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

16
tox.ini
View File

@ -1,6 +1,6 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
envlist = py35,py36,py27,pypy,pep8,docs envlist = py{27,35,36},pep8,docs
[testenv] [testenv]
usedevelop = True usedevelop = True
@ -9,11 +9,7 @@ passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJ
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = commands = stestr run {posargs}
python setup.py test --testr-args='{posargs}'
[tox:jenkins]
sitepackages = True
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
@ -21,19 +17,16 @@ commands = flake8 {posargs}
[testenv:docs] [testenv:docs]
basepython = python3 basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3 basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = commands =
rm -rf releasenotes/build rm -rf releasenotes/build
sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html 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] [testenv:venv]
basepython = python3 basepython = python3
commands = {posargs} commands = {posargs}
@ -51,4 +44,3 @@ basepython = python3
deps = deps =
-c{toxinidir}/lower-constraints.txt -c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt