Switch to stestr
Use stestr for tests. Also clean tox.ini and add check for flake8 H106: Don't put vim configuration in source files. Change-Id: Ia76961a091688372c6df363d5e1dcb29ff0f39bf
This commit is contained in:
parent
19b9f685b5
commit
db3d46a7d3
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@ pip-log.txt
|
|||||||
nosetests.xml
|
nosetests.xml
|
||||||
.testrepository
|
.testrepository
|
||||||
.venv
|
.venv
|
||||||
|
.stestr
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./bifrost/tests
|
||||||
|
top_dir=.
|
@ -66,6 +66,7 @@ snowballstemmer==1.2.1
|
|||||||
Sphinx==1.6.5
|
Sphinx==1.6.5
|
||||||
sphinxcontrib-websupport==1.0.1
|
sphinxcontrib-websupport==1.0.1
|
||||||
sphinxcontrib-svg2pdfconverter==0.1.0
|
sphinxcontrib-svg2pdfconverter==0.1.0
|
||||||
|
stestr==2.0.0
|
||||||
stevedore==1.28.0
|
stevedore==1.28.0
|
||||||
testrepository==0.0.18
|
testrepository==0.0.18
|
||||||
testscenarios==0.4
|
testscenarios==0.4
|
||||||
|
@ -7,6 +7,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
|||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.0 # Apache-2.0
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
testrepository>=0.0.18 # 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
|
||||||
|
34
tox.ini
34
tox.ini
@ -5,25 +5,25 @@ skipsdist = True
|
|||||||
ignore_basepython_conflict=true
|
ignore_basepython_conflict=true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
|
||||||
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
usedevelop = True
|
||||||
|
install_command = pip install -U {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
-r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
commands = stestr run --slowest {posargs}
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands =
|
||||||
doc8 doc/source releasenotes/source README.rst CONTRIBUTING.rst MISSION.rst HACKING.rst
|
flake8 {posargs}
|
||||||
|
doc8 doc/source releasenotes/source README.rst CONTRIBUTING.rst MISSION.rst HACKING.rst
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
deps =
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
-r{toxinidir}/doc/requirements.txt
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
@ -39,8 +39,9 @@ commands = sphinx-build -W -b html doc/source doc/build/html
|
|||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
whitelist_externals = make
|
whitelist_externals = make
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
commands = sphinx-build -W -b latex doc/source doc/build/pdf
|
commands =
|
||||||
make -C doc/build/pdf
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||||
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
commands = oslo_debug_helper -t bifrost/tests {posargs}
|
commands = oslo_debug_helper -t bifrost/tests {posargs}
|
||||||
@ -49,7 +50,8 @@ commands = oslo_debug_helper -t bifrost/tests {posargs}
|
|||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands =
|
||||||
|
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:debug-py36]
|
[testenv:debug-py36]
|
||||||
basepython = python3.6
|
basepython = python3.6
|
||||||
@ -58,6 +60,8 @@ commands = oslo_debug_helper -t bifrost/tests {posargs}
|
|||||||
[flake8]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = F403,H102,H303
|
ignore = F403,H102,H303
|
||||||
|
# [H106] Don't put vim configuration in source files.
|
||||||
|
enable-extensions=H106
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,os_ironic.py,os_ironic_node.py,os_ironic_inspect.py,os_keystone_service.py
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,os_ironic.py,os_ironic_node.py,os_ironic_inspect.py,os_keystone_service.py
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user