diff --git a/.gitignore b/.gitignore index 471d03300..a2f5dbe67 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ pip-log.txt nosetests.xml .testrepository .venv +.stestr # Translations *.mo diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..5ee498303 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./bifrost/tests +top_dir=. \ No newline at end of file diff --git a/lower-constraints.txt b/lower-constraints.txt index 2e761635c..b04a89565 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -66,6 +66,7 @@ snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.0.1 sphinxcontrib-svg2pdfconverter==0.1.0 +stestr==2.0.0 stevedore==1.28.0 testrepository==0.0.18 testscenarios==0.4 diff --git a/test-requirements.txt b/test-requirements.txt index c41056ca9..47a5b158a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,6 +7,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 doc8>=0.6.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 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 04e55fca4..ea6307ce4 100644 --- a/tox.ini +++ b/tox.ini @@ -5,25 +5,25 @@ skipsdist = True ignore_basepython_conflict=true [testenv] -usedevelop = True -install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} basepython = python3 +usedevelop = True +install_command = pip install -U {opts} {packages} setenv = - VIRTUAL_ENV={envdir} - PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = python setup.py test --slowest --testr-args='{posargs}' + VIRTUAL_ENV={envdir} + PYTHONWARNINGS=default::DeprecationWarning +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -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 [testenv:pep8] -commands = flake8 - doc8 doc/source releasenotes/source README.rst CONTRIBUTING.rst MISSION.rst HACKING.rst +commands = + flake8 {posargs} + doc8 doc/source releasenotes/source README.rst CONTRIBUTING.rst MISSION.rst HACKING.rst [testenv:venv] -deps = - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/doc/requirements.txt commands = {posargs} [testenv:cover] @@ -39,8 +39,9 @@ commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] whitelist_externals = make deps = {[testenv:docs]deps} -commands = sphinx-build -W -b latex doc/source doc/build/pdf - make -C doc/build/pdf +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf [testenv:debug] commands = oslo_debug_helper -t bifrost/tests {posargs} @@ -49,7 +50,8 @@ commands = oslo_debug_helper -t bifrost/tests {posargs} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -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] basepython = python3.6 @@ -58,6 +60,8 @@ commands = oslo_debug_helper -t bifrost/tests {posargs} [flake8] show-source = True 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 [testenv:lower-constraints]