2012-07-24 23:40:29 +00:00
|
|
|
[tox]
|
2017-03-28 09:41:40 +00:00
|
|
|
envlist = pep8,py35,py27,pip-check-reqs
|
2016-01-14 08:15:29 +00:00
|
|
|
minversion = 2.3.1
|
2013-10-03 14:58:54 +00:00
|
|
|
skipsdist = True
|
2012-07-24 23:40:29 +00:00
|
|
|
|
2014-09-23 21:39:38 +00:00
|
|
|
[tempestenv]
|
2015-01-28 19:23:43 +00:00
|
|
|
sitepackages = False
|
2016-04-20 06:00:54 +00:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
OS_TEST_PATH=./tempest/test_discover
|
|
|
|
deps =
|
2017-12-01 06:38:54 +00:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
2016-04-20 06:00:54 +00:00
|
|
|
-r{toxinidir}/requirements.txt
|
2014-09-23 21:39:38 +00:00
|
|
|
|
|
|
|
[testenv]
|
2016-04-20 06:00:54 +00:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2017-08-11 13:36:18 +00:00
|
|
|
OS_LOG_CAPTURE=1
|
2016-06-29 07:33:56 +00:00
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2017-09-14 20:51:25 +00:00
|
|
|
passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH TEMPEST_CONFIG TEMPEST_CONFIG_DIR http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY ZUUL_CACHE_DIR REQUIREMENTS_PIP_LOCATION GENERATE_TEMPEST_PLUGIN_LIST
|
2013-10-03 14:58:54 +00:00
|
|
|
usedevelop = True
|
2017-12-01 06:38:54 +00:00
|
|
|
install_command = pip install {opts} {packages}
|
2014-09-23 21:39:38 +00:00
|
|
|
whitelist_externals = *
|
2016-04-20 06:00:54 +00:00
|
|
|
deps =
|
2017-12-01 06:38:54 +00:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
2016-04-20 06:00:54 +00:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2014-11-25 13:18:23 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2017-09-14 20:51:25 +00:00
|
|
|
stestr --test-path ./tempest/tests run {posargs}
|
2013-10-03 15:20:09 +00:00
|
|
|
|
2014-08-05 18:11:29 +00:00
|
|
|
[testenv:genconfig]
|
2016-06-21 22:06:49 +00:00
|
|
|
commands = oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf
|
2014-08-05 18:11:29 +00:00
|
|
|
|
2014-01-07 21:54:55 +00:00
|
|
|
[testenv:cover]
|
2017-11-29 00:19:27 +00:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source tempest --parallel-mode
|
|
|
|
commands =
|
|
|
|
coverage erase
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
stestr --test-path ./tempest/tests run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
coverage report
|
2014-01-07 21:54:55 +00:00
|
|
|
|
2013-06-07 18:59:19 +00:00
|
|
|
[testenv:all]
|
2016-04-29 20:38:51 +00:00
|
|
|
envdir = .tox/tempest
|
2014-09-23 21:39:38 +00:00
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
2014-10-27 15:43:52 +00:00
|
|
|
# 'all' includes slow tests
|
2016-04-20 06:00:54 +00:00
|
|
|
setenv =
|
|
|
|
{[tempestenv]setenv}
|
|
|
|
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
|
2014-09-23 21:39:38 +00:00
|
|
|
deps = {[tempestenv]deps}
|
2013-06-07 18:59:19 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2016-07-28 18:47:27 +00:00
|
|
|
tempest run --regex {posargs}
|
2013-06-17 19:29:10 +00:00
|
|
|
|
2015-07-27 13:19:08 +00:00
|
|
|
[testenv:all-plugin]
|
|
|
|
sitepackages = True
|
|
|
|
# 'all' includes slow tests
|
2016-04-20 06:00:54 +00:00
|
|
|
setenv =
|
|
|
|
{[tempestenv]setenv}
|
|
|
|
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
|
2015-07-27 13:19:08 +00:00
|
|
|
deps = {[tempestenv]deps}
|
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2016-07-28 18:47:27 +00:00
|
|
|
tempest run --regex {posargs}
|
2015-07-27 13:19:08 +00:00
|
|
|
|
2013-05-02 18:33:18 +00:00
|
|
|
[testenv:full]
|
2016-04-29 20:38:51 +00:00
|
|
|
envdir = .tox/tempest
|
2014-09-23 21:39:38 +00:00
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
|
|
|
setenv = {[tempestenv]setenv}
|
|
|
|
deps = {[tempestenv]deps}
|
2013-08-07 19:48:21 +00:00
|
|
|
# The regex below is used to select which tests to run and exclude the slow tag:
|
2015-12-01 07:51:34 +00:00
|
|
|
# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
|
2013-07-30 20:37:32 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2017-03-01 16:35:58 +00:00
|
|
|
tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
|
|
|
|
tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' {posargs}
|
2013-07-30 20:37:32 +00:00
|
|
|
|
2014-02-10 14:21:51 +00:00
|
|
|
[testenv:full-serial]
|
2016-04-29 20:38:51 +00:00
|
|
|
envdir = .tox/tempest
|
2014-09-23 21:39:38 +00:00
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
|
|
|
setenv = {[tempestenv]setenv}
|
|
|
|
deps = {[tempestenv]deps}
|
2014-02-10 14:21:51 +00:00
|
|
|
# The regex below is used to select which tests to run and exclude the slow tag:
|
2015-12-01 07:51:34 +00:00
|
|
|
# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
|
2014-02-10 14:21:51 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2016-09-21 09:47:32 +00:00
|
|
|
tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs}
|
2014-02-10 14:21:51 +00:00
|
|
|
|
2017-03-06 15:11:13 +00:00
|
|
|
[testenv:scenario]
|
|
|
|
envdir = .tox/tempest
|
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
|
|
|
setenv = {[tempestenv]setenv}
|
|
|
|
deps = {[tempestenv]deps}
|
|
|
|
# The regex below is used to select all scenario tests
|
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
tempest run --serial --regex '(^tempest\.scenario)' {posargs}
|
|
|
|
|
2013-05-02 18:33:18 +00:00
|
|
|
[testenv:smoke]
|
2016-04-29 20:38:51 +00:00
|
|
|
envdir = .tox/tempest
|
2014-09-23 21:39:38 +00:00
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
|
|
|
setenv = {[tempestenv]setenv}
|
|
|
|
deps = {[tempestenv]deps}
|
2013-11-14 20:55:55 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2016-07-28 18:47:27 +00:00
|
|
|
tempest run --regex '\[.*\bsmoke\b.*\]' {posargs}
|
2013-11-14 20:55:55 +00:00
|
|
|
|
|
|
|
[testenv:smoke-serial]
|
2016-04-29 20:38:51 +00:00
|
|
|
envdir = .tox/tempest
|
2014-09-23 21:39:38 +00:00
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
|
|
|
setenv = {[tempestenv]setenv}
|
|
|
|
deps = {[tempestenv]deps}
|
2013-11-14 20:55:55 +00:00
|
|
|
# This is still serial because neutron doesn't work with parallel. See:
|
|
|
|
# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
|
|
|
|
# job would fail if we moved it to parallel.
|
2013-05-02 18:33:18 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2016-07-28 18:47:27 +00:00
|
|
|
tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs}
|
2013-05-02 18:33:18 +00:00
|
|
|
|
2013-05-21 21:57:41 +00:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2016-04-29 20:38:51 +00:00
|
|
|
[testenv:venv-tempest]
|
|
|
|
envdir = .tox/tempest
|
|
|
|
sitepackages = {[tempestenv]sitepackages}
|
|
|
|
setenv = {[tempestenv]setenv}
|
|
|
|
deps = {[tempestenv]deps}
|
|
|
|
commands = {posargs}
|
|
|
|
|
2014-06-19 01:58:32 +00:00
|
|
|
[testenv:docs]
|
2015-07-30 20:24:08 +00:00
|
|
|
commands =
|
2017-08-22 09:06:15 +00:00
|
|
|
rm -rf doc/build
|
2016-04-20 06:00:54 +00:00
|
|
|
python setup.py build_sphinx {posargs}
|
2014-06-19 01:58:32 +00:00
|
|
|
|
2012-07-24 23:40:29 +00:00
|
|
|
[testenv:pep8]
|
2013-10-24 21:49:14 +00:00
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
flake8 {posargs}
|
|
|
|
check-uuid
|
2013-10-24 21:49:14 +00:00
|
|
|
|
2015-02-26 22:12:15 +00:00
|
|
|
[testenv:uuidgen]
|
|
|
|
commands =
|
2016-04-20 06:00:54 +00:00
|
|
|
check-uuid --fix
|
2015-02-19 06:29:49 +00:00
|
|
|
|
2013-05-01 15:22:07 +00:00
|
|
|
[hacking]
|
2013-05-23 19:23:12 +00:00
|
|
|
local-check-factory = tempest.hacking.checks.factory
|
2014-05-17 14:42:36 +00:00
|
|
|
import_exceptions = tempest.services
|
2013-05-01 15:22:07 +00:00
|
|
|
|
2013-04-29 01:00:21 +00:00
|
|
|
[flake8]
|
2013-07-18 21:10:19 +00:00
|
|
|
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/
|
2014-06-09 22:37:19 +00:00
|
|
|
# E123 skipped because it is ignored by default in the default pep8
|
2014-06-18 00:25:40 +00:00
|
|
|
# E129 skipped because it is too limiting when combined with other rules
|
2015-11-19 09:48:27 +00:00
|
|
|
ignore = E125,E123,E129
|
2013-04-29 01:00:21 +00:00
|
|
|
show-source = True
|
2017-08-22 09:06:15 +00:00
|
|
|
exclude = .git,.venv,.tox,dist,doc,*egg,build
|
2016-12-07 16:51:26 +00:00
|
|
|
enable-extensions = H106,H203,H904
|
2017-02-10 09:05:26 +00:00
|
|
|
import-order-style = pep8
|
2016-02-23 15:12:48 +00:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
2017-08-22 09:06:15 +00:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2016-07-22 11:04:26 +00:00
|
|
|
|
|
|
|
[testenv:pip-check-reqs]
|
|
|
|
# Do not install test-requirements as that will pollute the virtualenv for
|
|
|
|
# determining missing packages.
|
|
|
|
# This also means that pip-check-reqs must be installed separately, outside
|
|
|
|
# of the requirements.txt files
|
|
|
|
deps = pip_check_reqs
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
commands=
|
|
|
|
pip-extra-reqs -d --ignore-file=tempest/tests/* tempest
|
|
|
|
pip-missing-reqs -d --ignore-file=tempest/tests/* tempest
|
2016-11-30 13:19:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
[testenv:bindep]
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
2017-06-29 08:27:01 +00:00
|
|
|
|
|
|
|
[testenv:plugin-sanity-check]
|
|
|
|
# perform tempest plugin sanity
|
|
|
|
whitelist_externals = bash
|
|
|
|
commands =
|
|
|
|
bash tools/tempest-plugin-sanity.sh
|