blob: fa32ba3669092ebe1de3cb32d53c6706bdd3af86 [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 Manne095e742023-06-01 13:43:17 -050014 -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 Manne095e742023-06-01 13:43:17 -050046 -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
Katarina Strenkova433dbdc2023-08-29 15:17:57 +000067 coverage report -m --fail-under=76
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
Ghanshyam Mann518e4262023-02-10 19:57:36 -0600129[testenv:integrated-full]
130envdir = .tox/tempest
131sitepackages = {[tempestenv]sitepackages}
132basepython = {[tempestenv]basepython}
133setenv = {[tempestenv]setenv}
134deps = {[tempestenv]deps}
135# The regex below is used to select which tests to run. It exclude the extra
136# tests mentioned in tools/tempest-extra-tests-list.txt and slow tag:
137# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
138# FIXME: We can replace it with the `--exclude-regex` option to exclude tests now.
139regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
140regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
141commands =
142 find . -type f -name "*.pyc" -delete
143 tempest run --regex {[testenv:integrated-full]regex1} --exclude-list ./tools/tempest-extra-tests-list.txt {posargs}
144 tempest run --combine --serial --regex {[testenv:integrated-full]regex2} {posargs}
145
146[testenv:extra-tests]
147envdir = .tox/tempest
148sitepackages = {[tempestenv]sitepackages}
149basepython = {[tempestenv]basepython}
150setenv = {[tempestenv]setenv}
151deps = {[tempestenv]deps}
152# The regex below is used to select extra tests mentioned in
153# tools/tempest-extra-tests-list.txt and exclude slow tag tests:
154# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
155# FIXME: We can replace it with the `--exclude-regex` option to exclude tests now.
156exclude-regex = '\[.*\bslow\b.*\]'
157commands =
158 find . -type f -name "*.pyc" -delete
159 tempest run --exclude-regex {[testenv:extra-tests]exclude-regex} --include-list ./tools/tempest-extra-tests-list.txt {posargs}
160
Attila Fazekas3f219f52018-03-01 16:50:10 +0000161[testenv:full-parallel]
162envdir = .tox/tempest
163sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600164basepython = {[tempestenv]basepython}
Attila Fazekas3f219f52018-03-01 16:50:10 +0000165setenv = {[tempestenv]setenv}
166deps = {[tempestenv]deps}
Ghanshyam Mann518e4262023-02-10 19:57:36 -0600167# But exlcude the extra tests mentioned in tools/tempest-extra-tests-list.txt
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000168regex = '(^tempest\.scenario.*)|(^tempest\.serial_tests)|(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
Attila Fazekas3f219f52018-03-01 16:50:10 +0000169commands =
170 find . -type f -name "*.pyc" -delete
Ghanshyam Mann518e4262023-02-10 19:57:36 -0600171 tempest run --regex {[testenv:full-parallel]regex} --exclude-list ./tools/tempest-extra-tests-list.txt {posargs}
Attila Fazekas3f219f52018-03-01 16:50:10 +0000172
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500173[testenv:api-microversion-tests]
174envdir = .tox/tempest
175sitepackages = {[tempestenv]sitepackages}
176basepython = {[tempestenv]basepython}
177setenv = {[tempestenv]setenv}
178deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000179regex = '(^tempest\.api\.compute)|(^tempest\.api\.volume)'
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500180# The regex below is used to select all tempest api tests for services having API
181# microversion concept.
182commands =
183 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000184 tempest run --regex {[testenv:api-microversion-tests]regex} {posargs}
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500185
Ghanshyam5072a242019-07-03 14:40:53 +0000186[testenv:integrated-network]
187envdir = .tox/tempest
188sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600189basepython = {[tempestenv]basepython}
Ghanshyam5072a242019-07-03 14:40:53 +0000190setenv = {[tempestenv]setenv}
191deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000192regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
193regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam5072a242019-07-03 14:40:53 +0000194# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000195# tests listed in exclude-list file:
Ghanshyam5072a242019-07-03 14:40:53 +0000196commands =
197 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000198 tempest run --regex {[testenv:integrated-network]regex1} --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs}
199 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 +0000200
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000201[testenv:integrated-compute]
202envdir = .tox/tempest
203sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600204basepython = {[tempestenv]basepython}
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000205setenv = {[tempestenv]setenv}
206deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000207regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
208regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000209# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000210# tests listed in exclude-list file:
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000211commands =
212 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000213 tempest run --regex {[testenv:integrated-compute]regex1} --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs}
214 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 +0000215
Ghanshyam31609dc2019-07-05 09:23:37 +0000216[testenv:integrated-placement]
217envdir = .tox/tempest
218sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600219basepython = {[tempestenv]basepython}
Ghanshyam31609dc2019-07-05 09:23:37 +0000220setenv = {[tempestenv]setenv}
221deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000222regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
223regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam31609dc2019-07-05 09:23:37 +0000224# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000225# tests listed in exclude-list file:
Ghanshyam31609dc2019-07-05 09:23:37 +0000226commands =
227 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000228 tempest run --regex {[testenv:integrated-placement]regex1} --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs}
229 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 +0000230
Ghanshyam Manna6994452019-07-05 08:43:23 +0000231[testenv:integrated-storage]
232envdir = .tox/tempest
233sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600234basepython = {[tempestenv]basepython}
Ghanshyam Manna6994452019-07-05 08:43:23 +0000235setenv = {[tempestenv]setenv}
236deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000237regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
238regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam Manna6994452019-07-05 08:43:23 +0000239# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000240# tests listed in exclude-list file:
Ghanshyam Manna6994452019-07-05 08:43:23 +0000241commands =
242 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000243 tempest run --regex {[testenv:integrated-storage]regex1} --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs}
244 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 +0000245
Ghanshyam95358522019-07-05 08:58:32 +0000246[testenv:integrated-object-storage]
247envdir = .tox/tempest
248sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600249basepython = {[tempestenv]basepython}
Ghanshyam95358522019-07-05 08:58:32 +0000250setenv = {[tempestenv]setenv}
251deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000252regex1 = '(?!.*\[.*\bslow\b.*\])(^tempest\.api)'
253regex2 = '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)'
Ghanshyam95358522019-07-05 08:58:32 +0000254# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000255# tests listed in exclude-list file:
Ghanshyam95358522019-07-05 08:58:32 +0000256commands =
257 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000258 tempest run --regex {[testenv:integrated-object-storage]regex1} --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs}
259 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 +0000260
Matthew Treinish99288cd2014-02-10 09:21:51 -0500261[testenv:full-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400262envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400263sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600264basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400265setenv = {[tempestenv]setenv}
266deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000267regex = '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|serial_tests))'
Matthew Treinish99288cd2014-02-10 09:21:51 -0500268# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +0900269# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Martin Kopecdc844232020-12-24 15:57:53 +0000270# FIXME: We can replace it with the `--exclude-regex` option to exclude tests now.
Matthew Treinish99288cd2014-02-10 09:21:51 -0500271commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900272 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000273 tempest run --serial --regex {[testenv:full-serial]regex} {posargs}
Matthew Treinish99288cd2014-02-10 09:21:51 -0500274
Andrea Frittolib838af92017-03-06 15:11:13 +0000275[testenv:scenario]
276envdir = .tox/tempest
277sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600278basepython = {[tempestenv]basepython}
Andrea Frittolib838af92017-03-06 15:11:13 +0000279setenv = {[tempestenv]setenv}
280deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000281regex = '(^tempest\.scenario)'
Andrea Frittolib838af92017-03-06 15:11:13 +0000282# The regex below is used to select all scenario tests
283commands =
284 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000285 tempest run --serial --regex {[testenv:scenario]regex} {posargs}
Andrea Frittolib838af92017-03-06 15:11:13 +0000286
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400287[testenv:smoke]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400288envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400289sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600290basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400291setenv = {[tempestenv]setenv}
292deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000293regex = '\[.*\bsmoke\b.*\]'
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400294commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900295 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000296 tempest run --regex {[testenv:smoke]regex} {posargs}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400297
Joe Gordond2796292013-11-14 12:55:55 -0800298[testenv:smoke-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400299envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400300sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600301basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400302setenv = {[tempestenv]setenv}
303deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000304regex = '\[.*\bsmoke\b.*\]'
Joe Gordond2796292013-11-14 12:55:55 -0800305# This is still serial because neutron doesn't work with parallel. See:
306# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
307# job would fail if we moved it to parallel.
308commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900309 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000310 tempest run --serial --regex {[testenv:smoke-serial]regex} {posargs}
Joe Gordond2796292013-11-14 12:55:55 -0800311
ghanshyam10326c72018-08-01 08:53:00 +0000312[testenv:slow-serial]
313envdir = .tox/tempest
314sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600315basepython = {[tempestenv]basepython}
ghanshyam10326c72018-08-01 08:53:00 +0000316setenv = {[tempestenv]setenv}
317deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000318regex = '\[.*\bslow\b.*\]'
ghanshyam10326c72018-08-01 08:53:00 +0000319# The regex below is used to select the slow tagged tests to run serially:
320commands =
321 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000322 tempest run --serial --regex {[testenv:slow-serial]regex} {posargs}
ghanshyam10326c72018-08-01 08:53:00 +0000323
Ghanshyam Mann6bb98c22023-02-10 18:22:02 -0600324[testenv:slow]
325envdir = .tox/tempest
326sitepackages = {[tempestenv]sitepackages}
327basepython = {[tempestenv]basepython}
328setenv = {[tempestenv]setenv}
329deps = {[tempestenv]deps}
330# The regex below is used to select the slow tagged tests:
yatinb70d30d2023-07-27 04:29:51 +0000331regex = '\[.*\bslow\b.*\]'
Ghanshyam Mann6bb98c22023-02-10 18:22:02 -0600332commands =
333 find . -type f -name "*.pyc" -delete
yatinb70d30d2023-07-27 04:29:51 +0000334 tempest run --regex {[testenv:slow]regex} {posargs}
Ghanshyam Mann6bb98c22023-02-10 18:22:02 -0600335
Ghanshyam Manne2183ca2023-02-10 19:31:52 -0600336[testenv:multinode]
337envdir = .tox/tempest
338sitepackages = {[tempestenv]sitepackages}
339basepython = {[tempestenv]basepython}
340setenv = {[tempestenv]setenv}
341deps = {[tempestenv]deps}
342# The regex below is used to select the multinode and smoke tagged tests
343regex = '\[.*\bsmoke|multinode\b.*\]'
344commands =
345 find . -type f -name "*.pyc" -delete
346 tempest run --regex {[testenv:multinode]regex} {posargs}
347
Ghanshyama0b8ca42019-07-17 09:46:41 +0000348[testenv:ipv6-only]
349envdir = .tox/tempest
350sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600351basepython = {[tempestenv]basepython}
Ghanshyama0b8ca42019-07-17 09:46:41 +0000352setenv = {[tempestenv]setenv}
353deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000354regex = '\[.*\bsmoke|ipv6|test_network_v6\b.*\]'
Ghanshyama0b8ca42019-07-17 09:46:41 +0000355# Run only smoke and ipv6 tests. This env is used to tests
356# the ipv6 deployments and basic tests run fine so that we can
357# verify that services listen on IPv6 address.
358commands =
359 find . -type f -name "*.pyc" -delete
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000360 tempest run --regex {[testenv:ipv6-only]regex} {posargs}
Ghanshyama0b8ca42019-07-17 09:46:41 +0000361
Sean Dagueb56052b2013-05-21 17:57:41 -0400362[testenv:venv]
Matt Riedemannd5e92822018-01-25 11:25:57 -0500363deps =
Ghanshyam Manne095e742023-06-01 13:43:17 -0500364 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Matt Riedemannd5e92822018-01-25 11:25:57 -0500365 -r{toxinidir}/requirements.txt
366 -r{toxinidir}/doc/requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400367commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400368
Matthew Treinish0e25a902016-04-29 16:38:51 -0400369[testenv:venv-tempest]
370envdir = .tox/tempest
371sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600372basepython = {[tempestenv]basepython}
Matthew Treinish0e25a902016-04-29 16:38:51 -0400373setenv = {[tempestenv]setenv}
374deps = {[tempestenv]deps}
375commands = {posargs}
376
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400377[testenv:docs]
junboli173b11c2018-01-15 11:25:35 +0800378deps =
Ghanshyam Manne095e742023-06-01 13:43:17 -0500379 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800380 -r{toxinidir}/doc/requirements.txt
Mathew Oddenb389faa2015-07-30 20:24:08 +0000381commands =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200382 sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute
383 sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity
384 sphinx-apidoc -f -o doc/source/tests/image tempest/api/image
385 sphinx-apidoc -f -o doc/source/tests/network tempest/api/network
386 sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage
387 sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario
388 sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume
junboli173b11c2018-01-15 11:25:35 +0800389 rm -rf doc/build
Ihar Hrachyshka8032b2e2017-11-27 14:16:59 -0800390 sphinx-build -W -b html doc/source doc/build/html
Martin Kopecdc844232020-12-24 15:57:53 +0000391allowlist_externals =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200392 rm
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400393
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900394[testenv:pdf-docs]
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900395deps = {[testenv:docs]deps}
Martin Kopecdc844232020-12-24 15:57:53 +0000396allowlist_externals =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200397 rm
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900398 make
399commands =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200400 sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute
401 sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity
402 sphinx-apidoc -f -o doc/source/tests/image tempest/api/image
403 sphinx-apidoc -f -o doc/source/tests/network tempest/api/network
404 sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage
405 sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario
406 sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900407 sphinx-build -W -b latex doc/source doc/build/pdf
408 make -C doc/build/pdf
409
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400410[testenv:pep8]
afazekas40fcb9b2019-03-08 11:25:11 +0100411deps =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100412 -r{toxinidir}/test-requirements.txt
afazekas40fcb9b2019-03-08 11:25:11 +0100413 autopep8
Matthew Treinish3d468112013-10-24 21:49:14 +0000414commands =
afazekas40fcb9b2019-03-08 11:25:11 +0100415 autopep8 --exit-code --max-line-length=79 --experimental --diff -r tempest setup.py
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900416 flake8 {posargs}
417 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000418
afazekas40fcb9b2019-03-08 11:25:11 +0100419[testenv:autopep8]
420deps = autopep8
afazekas40fcb9b2019-03-08 11:25:11 +0100421commands =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100422 {toxinidir}/tools/format.sh
afazekas40fcb9b2019-03-08 11:25:11 +0100423
Chris Hoge7579c1a2015-02-26 14:12:15 -0800424[testenv:uuidgen]
425commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900426 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600427
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400428[hacking]
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400429import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400430
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700431[flake8]
caoyuan349ba752019-04-23 19:40:06 +0800432# 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 -0400433# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400434# E129 skipped because it is too limiting when combined with other rules
Stephen Finucanefc42cc62018-07-06 13:39:55 +0100435# W504 skipped because it is overeager and unnecessary
Artom Lifshitz7bd4c3a2021-10-14 10:42:41 -0400436# H405 skipped because it arbitrarily forces doctring "title" lines
437ignore = E125,E123,E129,W504,H405
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700438show-source = True
junboli8bd00e32017-08-22 17:06:15 +0800439exclude = .git,.venv,.tox,dist,doc,*egg,build
Jordan Pittier525ec712016-12-07 17:51:26 +0100440enable-extensions = H106,H203,H904
Masayuki Igawa134d9f72017-02-10 18:05:26 +0900441import-order-style = pep8
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500442
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200443[flake8:local-plugins]
444extension =
445 T102 = checks:import_no_clients_in_api_and_scenario_tests
446 T104 = checks:scenario_tests_need_service_tags
447 T105 = checks:no_setup_teardown_class_for_tests
448 T107 = checks:service_tags_not_in_module_path
449 T108 = checks:no_hyphen_at_end_of_rand_name
450 N322 = checks:no_mutable_default_args
451 T109 = checks:no_testtools_skip_decorator
452 T110 = checks:get_resources_on_service_clients
453 T111 = checks:delete_resources_on_service_clients
454 T112 = checks:dont_import_local_tempest_into_lib
455 T113 = checks:use_rand_uuid_instead_of_uuid4
456 T114 = checks:dont_use_config_in_tempest_lib
457 T115 = checks:dont_put_admin_tests_on_nonadmin_path
458 T116 = checks:unsupported_exception_attribute_PY3
459 T117 = checks:negative_test_attribute_always_applied_to_negative_tests
Takashi Kajinami2a5ef1b2021-11-29 15:48:25 +0900460 T118 = checks:no_log_warn
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200461paths =
462 ./tempest/hacking
463
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500464[testenv:releasenotes]
junboli173b11c2018-01-15 11:25:35 +0800465deps =
Ghanshyam Manne095e742023-06-01 13:43:17 -0500466 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800467 -r{toxinidir}/doc/requirements.txt
junboli8bd00e32017-08-22 17:06:15 +0800468commands =
junboli173b11c2018-01-15 11:25:35 +0800469 rm -rf releasenotes/build
470 sphinx-build -a -E -W -d releasenotes/build/doctrees \
471 -b html releasenotes/source releasenotes/build/html
Martin Kopecdc844232020-12-24 15:57:53 +0000472allowlist_externals = rm
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200473
Masayuki Igawade1153b2019-07-30 18:02:07 +0900474[testenv:bashate]
Masayuki Igawade1153b2019-07-30 18:02:07 +0900475# if you want to test out some changes you have made to bashate
476# against tempest, just set BASHATE_INSTALL_PATH=/path/... to your
477# modified bashate tree
478deps =
479 {env:BASHATE_INSTALL_PATH:bashate}
Martin Kopecdc844232020-12-24 15:57:53 +0000480allowlist_externals = bash
Masayuki Igawade1153b2019-07-30 18:02:07 +0900481commands = bash -c "find {toxinidir}/tools \
482 -not \( -type d -name .?\* -prune \) \
483 -type f \
484 -name \*.sh \
Masayuki Igawafdd96442019-08-02 13:44:49 +0900485 -print0 | xargs -0 bashate -v -eE005,E042 -i E006"
Masayuki Igawade1153b2019-07-30 18:02:07 +0900486
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200487[testenv:pip-check-reqs]
488# Do not install test-requirements as that will pollute the virtualenv for
489# determining missing packages.
490# This also means that pip-check-reqs must be installed separately, outside
491# of the requirements.txt files
492deps = pip_check_reqs
493 -r{toxinidir}/requirements.txt
494commands=
495 pip-extra-reqs -d --ignore-file=tempest/tests/* tempest
496 pip-missing-reqs -d --ignore-file=tempest/tests/* tempest
Chandan Kumarac5c5532016-11-30 18:49:26 +0530497
498
499[testenv:bindep]
500# Do not install any requirements. We want this to be fast and work even if
501# system dependencies are missing, since it's used to tell you what system
502# dependencies are missing! This also means that bindep must be installed
503# separately, outside of the requirements files.
504deps = bindep
505commands = bindep test
Chandan Kumarb7affe42017-06-29 13:57:01 +0530506
507[testenv:plugin-sanity-check]
508# perform tempest plugin sanity
Martin Kopecdc844232020-12-24 15:57:53 +0000509allowlist_externals = bash
Chandan Kumarb7affe42017-06-29 13:57:01 +0530510commands =
511 bash tools/tempest-plugin-sanity.sh
Ghanshyam Mann83d13e52020-12-29 13:13:40 -0600512
513[testenv:stestr-master]
514envdir = .tox/tempest
515sitepackages = {[tempestenv]sitepackages}
516basepython = {[tempestenv]basepython}
517setenv = {[tempestenv]setenv}
518deps = {[tempestenv]deps}
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000519regex = '\[.*\bsmoke\b.*\]'
Ghanshyam Mann83d13e52020-12-29 13:13:40 -0600520# The below command install stestr master version and run smoke tests
521commands =
522 find . -type f -name "*.pyc" -delete
523 pip install -U git+https://github.com/mtreinish/stestr
Lukas Piwowarskif0473612023-01-20 10:01:19 +0000524 tempest run --regex {[testenv:stestr-master]regex} {posargs}