blob: e1c17df21cc96c721cf80e38df12f462f8d2a453 [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
Ghanshyam Mann87661fc2022-05-28 19:00:24 -05002envlist = pep8,py39,bashate,pip-check-reqs
Martin Kopecdc844232020-12-24 15:57:53 +00003minversion = 3.18.0
Ghanshyam1c680fd2020-01-20 11:43:29 -06004ignore_basepython_conflict = True
Jay Pipesa6aa5f22012-07-24 19:40:29 -04005
Matthew Treinish5b7626a2014-09-23 17:39:38 -04006[tempestenv]
Lee Yarwoodbc9fe8e2020-01-28 21:27:59 +00007basepython = python3
Joe Gordon9f1612e2015-01-28 11:23:43 -08008sitepackages = False
Masayuki Igawad81d3ce2016-04-20 15:00:54 +09009setenv =
10 VIRTUAL_ENV={envdir}
11 OS_TEST_PATH=./tempest/test_discover
Ghanshyam40b51c52020-01-19 19:31:11 -060012 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090013deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -060014 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090015 -r{toxinidir}/requirements.txt
Matthew Treinish5b7626a2014-09-23 17:39:38 -040016
17[testenv]
Ghanshyam1c680fd2020-01-20 11:43:29 -060018basepython = python3
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090019setenv =
20 VIRTUAL_ENV={envdir}
Andrea Frittoli8f018cb2017-08-11 14:36:18 +010021 OS_LOG_CAPTURE=1
Matthew Treinish5cc92892018-02-22 15:53:47 -050022 OS_STDOUT_CAPTURE=1
23 OS_STDERR_CAPTURE=1
24 OS_TEST_TIMEOUT=160
Stephen Finucanea6353c42018-07-06 14:00:36 +010025 PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site
Ghanshyam Mannea6644c2022-12-24 19:00:35 -080026passenv =
27 OS_STDOUT_CAPTURE
28 OS_STDERR_CAPTURE
29 OS_TEST_TIMEOUT
30 OS_TEST_LOCK_PATH
31 TEMPEST_CONFIG
32 TEMPEST_CONFIG_DIR
33 http_proxy
34 HTTP_PROXY
35 https_proxy
36 HTTPS_PROXY
37 no_proxy
38 NO_PROXY
39 ZUUL_CACHE_DIR
40 REQUIREMENTS_PIP_LOCATION
41 GENERATE_TEMPEST_PLUGIN_LIST
Matthew Treinish7228e112013-10-03 14:58:54 +000042usedevelop = True
Clark Boylana673bd92022-11-22 09:30:23 -080043allowlist_externals =
44 find
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090045deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -060046 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090047 -r{toxinidir}/requirements.txt
48 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050049commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090050 find . -type f -name "*.pyc" -delete
Masayuki Igawad0b8ebd2017-09-14 14:51:25 -060051 stestr --test-path ./tempest/tests run {posargs}
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000052
Jon Grimm270bd7f2014-08-05 18:11:29 +000053[testenv:genconfig]
Matthew Treinishbdef1c72016-06-21 18:06:49 -040054commands = oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf
Jon Grimm270bd7f2014-08-05 18:11:29 +000055
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000056[testenv:cover]
Matthew Treinish069d8282017-11-28 19:19:27 -050057setenv =
58 {[testenv]setenv}
59 PYTHON=coverage run --source tempest --parallel-mode
60commands =
61 coverage erase
62 find . -type f -name "*.pyc" -delete
63 stestr --test-path ./tempest/tests run {posargs}
64 coverage combine
65 coverage html -d cover
66 coverage xml -o cover/coverage.xml
67 coverage report
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000068
Manik Bindlish8a7aaa52018-11-30 10:22:30 +000069[testenv:debug]
Manik Bindlish8a7aaa52018-11-30 10:22:30 +000070commands = oslo_debug_helper -t tempest/tests {posargs}
71
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040072[testenv:all]
Matthew Treinish0e25a902016-04-29 16:38:51 -040073envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -040074sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -060075basepython = {[tempestenv]basepython}
David Kranzf9695d22014-10-27 11:43:52 -040076# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090077setenv =
78 {[tempestenv]setenv}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040079deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040080commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090081 find . -type f -name "*.pyc" -delete
Masayuki Igawafe0de682019-05-21 17:04:28 +090082 tempest run --regex {posargs:''}
Matthew Treinish87af1bb2013-06-17 15:29:10 -040083
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020084[testenv:all-plugin]
Andrea Frittoli35d12ca2018-02-13 15:42:25 +000085# DEPRECATED
86# NOTE(andreaf) The all-plugin tox env uses sitepackages
87# so that plugins installed outsite of Tempest virtual environment
88# can be discovered. After the implementation during the Queens
89# release cycle of the goal of moving Tempest plugins in dedicated
90# git repos, this environment should not be used anymore. "all"
91# should be used instead with the appropriate regex filtering.
92sitepackages = True
93# 'all' includes slow tests
94setenv =
95 {[tempestenv]setenv}
Ghanshyam1c680fd2020-01-20 11:43:29 -060096basepython = {[tempestenv]basepython}
Andrea Frittoli35d12ca2018-02-13 15:42:25 +000097deps = {[tempestenv]deps}
98commands =
99 echo "WARNING: The all-plugin env is deprecated and will be removed"
100 echo "WARNING Please use the 'all' environment for Tempest plugins."
101 find . -type f -name "*.pyc" -delete
Masayuki Igawafe0de682019-05-21 17:04:28 +0900102 tempest run --regex {posargs:''}
Andrea Frittoli35d12ca2018-02-13 15:42:25 +0000103
104[testenv:all-site-packages]
Marc Kodererc2f9b3a2015-07-27 15:19:08 +0200105sitepackages = True
106# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900107setenv =
108 {[tempestenv]setenv}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600109basepython = {[tempestenv]basepython}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +0200110deps = {[tempestenv]deps}
111commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900112 find . -type f -name "*.pyc" -delete
Masayuki Igawafe0de682019-05-21 17:04:28 +0900113 tempest run --regex {posargs:''}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +0200114
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400115[testenv:full]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400116envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400117sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600118basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400119setenv = {[tempestenv]setenv}
120deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -0400121# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +0900122# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Martin Kopecdc844232020-12-24 15:57:53 +0000123# FIXME: We can replace it with the `--exclude-regex` option to exclude tests now.
Matthew Treinish83d2ec42013-07-30 16:37:32 -0400124commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900125 find . -type f -name "*.pyc" -delete
Sean Dague49505df2017-03-01 11:35:58 -0500126 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100127 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)' {posargs}
Matthew Treinish83d2ec42013-07-30 16:37:32 -0400128
Attila Fazekas3f219f52018-03-01 16:50:10 +0000129[testenv:full-parallel]
130envdir = .tox/tempest
131sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600132basepython = {[tempestenv]basepython}
Attila Fazekas3f219f52018-03-01 16:50:10 +0000133setenv = {[tempestenv]setenv}
134deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000135regex = '(^tempest\.scenario.*)|(^tempest\.serial_tests)|(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
Attila Fazekas3f219f52018-03-01 16:50:10 +0000136# The regex below is used to select all tempest scenario and including the non slow api tests
137commands =
138 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000139 tempest run --regex {[testenv:full-parallel]regex} {posargs}
Attila Fazekas3f219f52018-03-01 16:50:10 +0000140
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500141[testenv:api-microversion-tests]
142envdir = .tox/tempest
143sitepackages = {[tempestenv]sitepackages}
144basepython = {[tempestenv]basepython}
145setenv = {[tempestenv]setenv}
146deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000147regex = '(^tempest\.api\.compute)|(^tempest\.api\.volume)'
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500148# The regex below is used to select all tempest api tests for services having API
149# microversion concept.
150commands =
151 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000152 tempest run --regex {[testenv:api-microversion-tests]regex} {posargs}
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500153
Ghanshyam5072a242019-07-03 14:40:53 +0000154[testenv:integrated-network]
155envdir = .tox/tempest
156sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600157basepython = {[tempestenv]basepython}
Ghanshyam5072a242019-07-03 14:40:53 +0000158setenv = {[tempestenv]setenv}
159deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000160regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
161regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam5072a242019-07-03 14:40:53 +0000162# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000163# tests listed in exclude-list file:
Ghanshyam5072a242019-07-03 14:40:53 +0000164commands =
165 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000166 tempest run --regex {[testenv:integrated-network]regex1} --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs}
167 tempest run --combine --serial --regex {[testenv:integrated-network]regex2} --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs}
Ghanshyam5072a242019-07-03 14:40:53 +0000168
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000169[testenv:integrated-compute]
170envdir = .tox/tempest
171sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600172basepython = {[tempestenv]basepython}
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000173setenv = {[tempestenv]setenv}
174deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000175regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
176regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000177# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000178# tests listed in exclude-list file:
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000179commands =
180 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000181 tempest run --regex {[testenv:integrated-compute]regex1} --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs}
182 tempest run --combine --serial --regex {[testenv:integrated-compute]regex2} --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs}
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000183
Ghanshyam31609dc2019-07-05 09:23:37 +0000184[testenv:integrated-placement]
185envdir = .tox/tempest
186sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600187basepython = {[tempestenv]basepython}
Ghanshyam31609dc2019-07-05 09:23:37 +0000188setenv = {[tempestenv]setenv}
189deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000190regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
191regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam31609dc2019-07-05 09:23:37 +0000192# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000193# tests listed in exclude-list file:
Ghanshyam31609dc2019-07-05 09:23:37 +0000194commands =
195 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000196 tempest run --regex {[testenv:integrated-placement]regex1} --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs}
197 tempest run --combine --serial --regex {[testenv:integrated-placement]regex2} --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs}
Ghanshyam31609dc2019-07-05 09:23:37 +0000198
Ghanshyam Manna6994452019-07-05 08:43:23 +0000199[testenv:integrated-storage]
200envdir = .tox/tempest
201sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600202basepython = {[tempestenv]basepython}
Ghanshyam Manna6994452019-07-05 08:43:23 +0000203setenv = {[tempestenv]setenv}
204deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000205regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
206regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam Manna6994452019-07-05 08:43:23 +0000207# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000208# tests listed in exclude-list file:
Ghanshyam Manna6994452019-07-05 08:43:23 +0000209commands =
210 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000211 tempest run --regex {[testenv:integrated-storage]regex1} --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs}
212 tempest run --combine --serial --regex {[testenv:integrated-storage]regex2} --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs}
Ghanshyam Manna6994452019-07-05 08:43:23 +0000213
Ghanshyam95358522019-07-05 08:58:32 +0000214[testenv:integrated-object-storage]
215envdir = .tox/tempest
216sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600217basepython = {[tempestenv]basepython}
Ghanshyam95358522019-07-05 08:58:32 +0000218setenv = {[tempestenv]setenv}
219deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000220regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
221regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam95358522019-07-05 08:58:32 +0000222# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000223# tests listed in exclude-list file:
Ghanshyam95358522019-07-05 08:58:32 +0000224commands =
225 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000226 tempest run --regex {[testenv:integrated-object-storage]regex1} --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs}
227 tempest run --combine --serial --regex {[testenv:integrated-object-storage]regex2} --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs}
Ghanshyam95358522019-07-05 08:58:32 +0000228
Matthew Treinish99288cd2014-02-10 09:21:51 -0500229[testenv:full-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400230envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400231sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600232basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400233setenv = {[tempestenv]setenv}
234deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000235regex = '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|serial_tests))'
Matthew Treinish99288cd2014-02-10 09:21:51 -0500236# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +0900237# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Martin Kopecdc844232020-12-24 15:57:53 +0000238# FIXME: We can replace it with the `--exclude-regex` option to exclude tests now.
Matthew Treinish99288cd2014-02-10 09:21:51 -0500239commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900240 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000241 tempest run --serial --regex {[testenv:full-serial]regex} {posargs}
Matthew Treinish99288cd2014-02-10 09:21:51 -0500242
Andrea Frittolib838af92017-03-06 15:11:13 +0000243[testenv:scenario]
244envdir = .tox/tempest
245sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600246basepython = {[tempestenv]basepython}
Andrea Frittolib838af92017-03-06 15:11:13 +0000247setenv = {[tempestenv]setenv}
248deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000249regex = '(^tempest\.scenario)'
Andrea Frittolib838af92017-03-06 15:11:13 +0000250# The regex below is used to select all scenario tests
251commands =
252 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000253 tempest run --serial --regex {[testenv:scenario]regex} {posargs}
Andrea Frittolib838af92017-03-06 15:11:13 +0000254
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400255[testenv:smoke]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400256envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400257sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600258basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400259setenv = {[tempestenv]setenv}
260deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000261regex = '\[.*\bsmoke\b.*\]'
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400262commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900263 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000264 tempest run --regex {[testenv:smoke]regex} {posargs}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400265
Joe Gordond2796292013-11-14 12:55:55 -0800266[testenv:smoke-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400267envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400268sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600269basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400270setenv = {[tempestenv]setenv}
271deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000272regex = '\[.*\bsmoke\b.*\]'
Joe Gordond2796292013-11-14 12:55:55 -0800273# This is still serial because neutron doesn't work with parallel. See:
274# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
275# job would fail if we moved it to parallel.
276commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900277 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000278 tempest run --serial --regex {[testenv:smoke-serial]regex} {posargs}
Joe Gordond2796292013-11-14 12:55:55 -0800279
ghanshyam10326c72018-08-01 08:53:00 +0000280[testenv:slow-serial]
281envdir = .tox/tempest
282sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600283basepython = {[tempestenv]basepython}
ghanshyam10326c72018-08-01 08:53:00 +0000284setenv = {[tempestenv]setenv}
285deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000286regex = '\[.*\bslow\b.*\]'
ghanshyam10326c72018-08-01 08:53:00 +0000287# The regex below is used to select the slow tagged tests to run serially:
288commands =
289 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000290 tempest run --serial --regex {[testenv:slow-serial]regex} {posargs}
ghanshyam10326c72018-08-01 08:53:00 +0000291
Ghanshyama0b8ca42019-07-17 09:46:41 +0000292[testenv:ipv6-only]
293envdir = .tox/tempest
294sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600295basepython = {[tempestenv]basepython}
Ghanshyama0b8ca42019-07-17 09:46:41 +0000296setenv = {[tempestenv]setenv}
297deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000298regex = '\[.*\bsmoke|ipv6|test_network_v6\b.*\]'
Ghanshyama0b8ca42019-07-17 09:46:41 +0000299# Run only smoke and ipv6 tests. This env is used to tests
300# the ipv6 deployments and basic tests run fine so that we can
301# verify that services listen on IPv6 address.
302commands =
303 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000304 tempest run --regex {[testenv:ipv6-only]regex} {posargs}
Ghanshyama0b8ca42019-07-17 09:46:41 +0000305
Sean Dagueb56052b2013-05-21 17:57:41 -0400306[testenv:venv]
Matt Riedemannd5e92822018-01-25 11:25:57 -0500307deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -0600308 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Matt Riedemannd5e92822018-01-25 11:25:57 -0500309 -r{toxinidir}/requirements.txt
310 -r{toxinidir}/doc/requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400311commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400312
Matthew Treinish0e25a902016-04-29 16:38:51 -0400313[testenv:venv-tempest]
314envdir = .tox/tempest
315sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600316basepython = {[tempestenv]basepython}
Matthew Treinish0e25a902016-04-29 16:38:51 -0400317setenv = {[tempestenv]setenv}
318deps = {[tempestenv]deps}
319commands = {posargs}
320
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400321[testenv:docs]
junboli173b11c2018-01-15 11:25:35 +0800322deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -0600323 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800324 -r{toxinidir}/doc/requirements.txt
Mathew Oddenb389faa2015-07-30 20:24:08 +0000325commands =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200326 sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute
327 sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity
328 sphinx-apidoc -f -o doc/source/tests/image tempest/api/image
329 sphinx-apidoc -f -o doc/source/tests/network tempest/api/network
330 sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage
331 sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario
332 sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume
junboli173b11c2018-01-15 11:25:35 +0800333 rm -rf doc/build
Ihar Hrachyshka8032b2e2017-11-27 14:16:59 -0800334 sphinx-build -W -b html doc/source doc/build/html
Martin Kopecdc844232020-12-24 15:57:53 +0000335allowlist_externals =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200336 rm
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400337
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900338[testenv:pdf-docs]
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900339deps = {[testenv:docs]deps}
Martin Kopecdc844232020-12-24 15:57:53 +0000340allowlist_externals =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200341 rm
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900342 make
343commands =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200344 sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute
345 sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity
346 sphinx-apidoc -f -o doc/source/tests/image tempest/api/image
347 sphinx-apidoc -f -o doc/source/tests/network tempest/api/network
348 sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage
349 sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario
350 sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900351 sphinx-build -W -b latex doc/source doc/build/pdf
352 make -C doc/build/pdf
353
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400354[testenv:pep8]
afazekas40fcb9b2019-03-08 11:25:11 +0100355deps =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100356 -r{toxinidir}/test-requirements.txt
afazekas40fcb9b2019-03-08 11:25:11 +0100357 autopep8
Matthew Treinish3d468112013-10-24 21:49:14 +0000358commands =
afazekas40fcb9b2019-03-08 11:25:11 +0100359 autopep8 --exit-code --max-line-length=79 --experimental --diff -r tempest setup.py
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900360 flake8 {posargs}
361 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000362
afazekas40fcb9b2019-03-08 11:25:11 +0100363[testenv:autopep8]
364deps = autopep8
afazekas40fcb9b2019-03-08 11:25:11 +0100365commands =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100366 {toxinidir}/tools/format.sh
afazekas40fcb9b2019-03-08 11:25:11 +0100367
Chris Hoge7579c1a2015-02-26 14:12:15 -0800368[testenv:uuidgen]
369commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900370 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600371
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400372[hacking]
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400373import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400374
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700375[flake8]
caoyuan349ba752019-04-23 19:40:06 +0800376# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.opendev.org/#/c/36788/
Matthew Treinish96e9e882014-06-09 18:37:19 -0400377# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400378# E129 skipped because it is too limiting when combined with other rules
Stephen Finucanefc42cc62018-07-06 13:39:55 +0100379# W504 skipped because it is overeager and unnecessary
Artom Lifshitz7bd4c3a2021-10-14 10:42:41 -0400380# H405 skipped because it arbitrarily forces doctring "title" lines
381ignore = E125,E123,E129,W504,H405
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700382show-source = True
junboli8bd00e32017-08-22 17:06:15 +0800383exclude = .git,.venv,.tox,dist,doc,*egg,build
Jordan Pittier525ec712016-12-07 17:51:26 +0100384enable-extensions = H106,H203,H904
Masayuki Igawa134d9f72017-02-10 18:05:26 +0900385import-order-style = pep8
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500386
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200387[flake8:local-plugins]
388extension =
389 T102 = checks:import_no_clients_in_api_and_scenario_tests
390 T104 = checks:scenario_tests_need_service_tags
391 T105 = checks:no_setup_teardown_class_for_tests
392 T107 = checks:service_tags_not_in_module_path
393 T108 = checks:no_hyphen_at_end_of_rand_name
394 N322 = checks:no_mutable_default_args
395 T109 = checks:no_testtools_skip_decorator
396 T110 = checks:get_resources_on_service_clients
397 T111 = checks:delete_resources_on_service_clients
398 T112 = checks:dont_import_local_tempest_into_lib
399 T113 = checks:use_rand_uuid_instead_of_uuid4
400 T114 = checks:dont_use_config_in_tempest_lib
401 T115 = checks:dont_put_admin_tests_on_nonadmin_path
402 T116 = checks:unsupported_exception_attribute_PY3
403 T117 = checks:negative_test_attribute_always_applied_to_negative_tests
Takashi Kajinami2a5ef1b2021-11-29 15:48:25 +0900404 T118 = checks:no_log_warn
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200405paths =
406 ./tempest/hacking
407
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500408[testenv:releasenotes]
junboli173b11c2018-01-15 11:25:35 +0800409deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -0600410 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800411 -r{toxinidir}/doc/requirements.txt
junboli8bd00e32017-08-22 17:06:15 +0800412commands =
junboli173b11c2018-01-15 11:25:35 +0800413 rm -rf releasenotes/build
414 sphinx-build -a -E -W -d releasenotes/build/doctrees \
415 -b html releasenotes/source releasenotes/build/html
Martin Kopecdc844232020-12-24 15:57:53 +0000416allowlist_externals = rm
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200417
Masayuki Igawade1153b2019-07-30 18:02:07 +0900418[testenv:bashate]
Masayuki Igawade1153b2019-07-30 18:02:07 +0900419# if you want to test out some changes you have made to bashate
420# against tempest, just set BASHATE_INSTALL_PATH=/path/... to your
421# modified bashate tree
422deps =
423 {env:BASHATE_INSTALL_PATH:bashate}
Martin Kopecdc844232020-12-24 15:57:53 +0000424allowlist_externals = bash
Masayuki Igawade1153b2019-07-30 18:02:07 +0900425commands = bash -c "find {toxinidir}/tools \
426 -not \( -type d -name .?\* -prune \) \
427 -type f \
428 -name \*.sh \
Masayuki Igawafdd96442019-08-02 13:44:49 +0900429 -print0 | xargs -0 bashate -v -eE005,E042 -i E006"
Masayuki Igawade1153b2019-07-30 18:02:07 +0900430
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200431[testenv:pip-check-reqs]
432# Do not install test-requirements as that will pollute the virtualenv for
433# determining missing packages.
434# This also means that pip-check-reqs must be installed separately, outside
435# of the requirements.txt files
436deps = pip_check_reqs
437 -r{toxinidir}/requirements.txt
438commands=
439 pip-extra-reqs -d --ignore-file=tempest/tests/* tempest
440 pip-missing-reqs -d --ignore-file=tempest/tests/* tempest
Chandan Kumarac5c5532016-11-30 18:49:26 +0530441
442
443[testenv:bindep]
444# Do not install any requirements. We want this to be fast and work even if
445# system dependencies are missing, since it's used to tell you what system
446# dependencies are missing! This also means that bindep must be installed
447# separately, outside of the requirements files.
448deps = bindep
449commands = bindep test
Chandan Kumarb7affe42017-06-29 13:57:01 +0530450
451[testenv:plugin-sanity-check]
452# perform tempest plugin sanity
Martin Kopecdc844232020-12-24 15:57:53 +0000453allowlist_externals = bash
Chandan Kumarb7affe42017-06-29 13:57:01 +0530454commands =
455 bash tools/tempest-plugin-sanity.sh
Ghanshyam Mann83d13e52020-12-29 13:13:40 -0600456
457[testenv:stestr-master]
458envdir = .tox/tempest
459sitepackages = {[tempestenv]sitepackages}
460basepython = {[tempestenv]basepython}
461setenv = {[tempestenv]setenv}
462deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000463regex = '\[.*\bsmoke\b.*\]'
Ghanshyam Mann83d13e52020-12-29 13:13:40 -0600464# The below command install stestr master version and run smoke tests
465commands =
466 find . -type f -name "*.pyc" -delete
467 pip install -U git+https://github.com/mtreinish/stestr
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000468 tempest run --regex {[testenv:stestr-master]regex} {posargs}