blob: 618f9e007a7cde357847090b25331bd1ae7a92e7 [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}
135# The regex below is used to select all tempest scenario and including the non slow api tests
136commands =
137 find . -type f -name "*.pyc" -delete
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100138 tempest run --regex '(^tempest\.scenario.*)|(^tempest\.serial_tests)|(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
Attila Fazekas3f219f52018-03-01 16:50:10 +0000139
Ghanshyam Mannba28d782021-09-03 10:21:54 -0500140[testenv:api-microversion-tests]
141envdir = .tox/tempest
142sitepackages = {[tempestenv]sitepackages}
143basepython = {[tempestenv]basepython}
144setenv = {[tempestenv]setenv}
145deps = {[tempestenv]deps}
146# The regex below is used to select all tempest api tests for services having API
147# microversion concept.
148commands =
149 find . -type f -name "*.pyc" -delete
150 tempest run --regex '(^tempest\.api\.compute)|(^tempest\.api\.volume)' {posargs}
151
Ghanshyam5072a242019-07-03 14:40:53 +0000152[testenv:integrated-network]
153envdir = .tox/tempest
154sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600155basepython = {[tempestenv]basepython}
Ghanshyam5072a242019-07-03 14:40:53 +0000156setenv = {[tempestenv]setenv}
157deps = {[tempestenv]deps}
158# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000159# tests listed in exclude-list file:
Ghanshyam5072a242019-07-03 14:40:53 +0000160commands =
161 find . -type f -name "*.pyc" -delete
Martin Kopecdc844232020-12-24 15:57:53 +0000162 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs}
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100163 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)' --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs}
Ghanshyam5072a242019-07-03 14:40:53 +0000164
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000165[testenv:integrated-compute]
166envdir = .tox/tempest
167sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600168basepython = {[tempestenv]basepython}
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000169setenv = {[tempestenv]setenv}
170deps = {[tempestenv]deps}
171# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000172# tests listed in exclude-list file:
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000173commands =
174 find . -type f -name "*.pyc" -delete
Martin Kopecdc844232020-12-24 15:57:53 +0000175 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs}
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100176 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)' --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs}
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000177
Ghanshyam31609dc2019-07-05 09:23:37 +0000178[testenv:integrated-placement]
179envdir = .tox/tempest
180sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600181basepython = {[tempestenv]basepython}
Ghanshyam31609dc2019-07-05 09:23:37 +0000182setenv = {[tempestenv]setenv}
183deps = {[tempestenv]deps}
184# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000185# tests listed in exclude-list file:
Ghanshyam31609dc2019-07-05 09:23:37 +0000186commands =
187 find . -type f -name "*.pyc" -delete
Martin Kopecdc844232020-12-24 15:57:53 +0000188 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs}
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100189 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)' --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs}
Ghanshyam31609dc2019-07-05 09:23:37 +0000190
Ghanshyam Manna6994452019-07-05 08:43:23 +0000191[testenv:integrated-storage]
192envdir = .tox/tempest
193sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600194basepython = {[tempestenv]basepython}
Ghanshyam Manna6994452019-07-05 08:43:23 +0000195setenv = {[tempestenv]setenv}
196deps = {[tempestenv]deps}
197# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000198# tests listed in exclude-list file:
Ghanshyam Manna6994452019-07-05 08:43:23 +0000199commands =
200 find . -type f -name "*.pyc" -delete
Martin Kopecdc844232020-12-24 15:57:53 +0000201 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs}
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100202 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)' --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs}
Ghanshyam Manna6994452019-07-05 08:43:23 +0000203
Ghanshyam95358522019-07-05 08:58:32 +0000204[testenv:integrated-object-storage]
205envdir = .tox/tempest
206sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600207basepython = {[tempestenv]basepython}
Ghanshyam95358522019-07-05 08:58:32 +0000208setenv = {[tempestenv]setenv}
209deps = {[tempestenv]deps}
210# The regex below is used to select which tests to run and exclude the slow tag and
Martin Kopecdc844232020-12-24 15:57:53 +0000211# tests listed in exclude-list file:
Ghanshyam95358522019-07-05 08:58:32 +0000212commands =
213 find . -type f -name "*.pyc" -delete
Martin Kopecdc844232020-12-24 15:57:53 +0000214 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs}
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100215 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)|(^tempest\.serial_tests)' --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs}
Ghanshyam95358522019-07-05 08:58:32 +0000216
Matthew Treinish99288cd2014-02-10 09:21:51 -0500217[testenv:full-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400218envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400219sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600220basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400221setenv = {[tempestenv]setenv}
222deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -0500223# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +0900224# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Martin Kopecdc844232020-12-24 15:57:53 +0000225# FIXME: We can replace it with the `--exclude-regex` option to exclude tests now.
Matthew Treinish99288cd2014-02-10 09:21:51 -0500226commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900227 find . -type f -name "*.pyc" -delete
Balazs Gibizerdfb30432021-12-14 17:25:16 +0100228 tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|serial_tests))' {posargs}
Matthew Treinish99288cd2014-02-10 09:21:51 -0500229
Andrea Frittolib838af92017-03-06 15:11:13 +0000230[testenv:scenario]
231envdir = .tox/tempest
232sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600233basepython = {[tempestenv]basepython}
Andrea Frittolib838af92017-03-06 15:11:13 +0000234setenv = {[tempestenv]setenv}
235deps = {[tempestenv]deps}
236# The regex below is used to select all scenario tests
237commands =
238 find . -type f -name "*.pyc" -delete
239 tempest run --serial --regex '(^tempest\.scenario)' {posargs}
240
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400241[testenv:smoke]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400242envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400243sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600244basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400245setenv = {[tempestenv]setenv}
246deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400247commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900248 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -0400249 tempest run --regex '\[.*\bsmoke\b.*\]' {posargs}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400250
Joe Gordond2796292013-11-14 12:55:55 -0800251[testenv:smoke-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400252envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400253sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600254basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400255setenv = {[tempestenv]setenv}
256deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -0800257# This is still serial because neutron doesn't work with parallel. See:
258# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
259# job would fail if we moved it to parallel.
260commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900261 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -0400262 tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs}
Joe Gordond2796292013-11-14 12:55:55 -0800263
ghanshyam10326c72018-08-01 08:53:00 +0000264[testenv:slow-serial]
265envdir = .tox/tempest
266sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600267basepython = {[tempestenv]basepython}
ghanshyam10326c72018-08-01 08:53:00 +0000268setenv = {[tempestenv]setenv}
269deps = {[tempestenv]deps}
270# The regex below is used to select the slow tagged tests to run serially:
271commands =
272 find . -type f -name "*.pyc" -delete
273 tempest run --serial --regex '\[.*\bslow\b.*\]' {posargs}
274
Ghanshyama0b8ca42019-07-17 09:46:41 +0000275[testenv:ipv6-only]
276envdir = .tox/tempest
277sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600278basepython = {[tempestenv]basepython}
Ghanshyama0b8ca42019-07-17 09:46:41 +0000279setenv = {[tempestenv]setenv}
280deps = {[tempestenv]deps}
281# Run only smoke and ipv6 tests. This env is used to tests
282# the ipv6 deployments and basic tests run fine so that we can
283# verify that services listen on IPv6 address.
284commands =
285 find . -type f -name "*.pyc" -delete
286 tempest run --regex '\[.*\bsmoke|ipv6|test_network_v6\b.*\]' {posargs}
287
Sean Dagueb56052b2013-05-21 17:57:41 -0400288[testenv:venv]
Matt Riedemannd5e92822018-01-25 11:25:57 -0500289deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -0600290 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Matt Riedemannd5e92822018-01-25 11:25:57 -0500291 -r{toxinidir}/requirements.txt
292 -r{toxinidir}/doc/requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400293commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400294
Matthew Treinish0e25a902016-04-29 16:38:51 -0400295[testenv:venv-tempest]
296envdir = .tox/tempest
297sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600298basepython = {[tempestenv]basepython}
Matthew Treinish0e25a902016-04-29 16:38:51 -0400299setenv = {[tempestenv]setenv}
300deps = {[tempestenv]deps}
301commands = {posargs}
302
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400303[testenv:docs]
junboli173b11c2018-01-15 11:25:35 +0800304deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -0600305 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800306 -r{toxinidir}/doc/requirements.txt
Mathew Oddenb389faa2015-07-30 20:24:08 +0000307commands =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200308 sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute
309 sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity
310 sphinx-apidoc -f -o doc/source/tests/image tempest/api/image
311 sphinx-apidoc -f -o doc/source/tests/network tempest/api/network
312 sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage
313 sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario
314 sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume
junboli173b11c2018-01-15 11:25:35 +0800315 rm -rf doc/build
Ihar Hrachyshka8032b2e2017-11-27 14:16:59 -0800316 sphinx-build -W -b html doc/source doc/build/html
Martin Kopecdc844232020-12-24 15:57:53 +0000317allowlist_externals =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200318 rm
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400319
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900320[testenv:pdf-docs]
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900321deps = {[testenv:docs]deps}
Martin Kopecdc844232020-12-24 15:57:53 +0000322allowlist_externals =
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200323 rm
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900324 make
325commands =
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
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900333 sphinx-build -W -b latex doc/source doc/build/pdf
334 make -C doc/build/pdf
335
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400336[testenv:pep8]
afazekas40fcb9b2019-03-08 11:25:11 +0100337deps =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100338 -r{toxinidir}/test-requirements.txt
afazekas40fcb9b2019-03-08 11:25:11 +0100339 autopep8
Matthew Treinish3d468112013-10-24 21:49:14 +0000340commands =
afazekas40fcb9b2019-03-08 11:25:11 +0100341 autopep8 --exit-code --max-line-length=79 --experimental --diff -r tempest setup.py
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900342 flake8 {posargs}
343 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000344
afazekas40fcb9b2019-03-08 11:25:11 +0100345[testenv:autopep8]
346deps = autopep8
afazekas40fcb9b2019-03-08 11:25:11 +0100347commands =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100348 {toxinidir}/tools/format.sh
afazekas40fcb9b2019-03-08 11:25:11 +0100349
Chris Hoge7579c1a2015-02-26 14:12:15 -0800350[testenv:uuidgen]
351commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900352 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600353
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400354[hacking]
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400355import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400356
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700357[flake8]
caoyuan349ba752019-04-23 19:40:06 +0800358# 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 -0400359# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400360# E129 skipped because it is too limiting when combined with other rules
Stephen Finucanefc42cc62018-07-06 13:39:55 +0100361# W504 skipped because it is overeager and unnecessary
Artom Lifshitz7bd4c3a2021-10-14 10:42:41 -0400362# H405 skipped because it arbitrarily forces doctring "title" lines
363ignore = E125,E123,E129,W504,H405
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700364show-source = True
junboli8bd00e32017-08-22 17:06:15 +0800365exclude = .git,.venv,.tox,dist,doc,*egg,build
Jordan Pittier525ec712016-12-07 17:51:26 +0100366enable-extensions = H106,H203,H904
Masayuki Igawa134d9f72017-02-10 18:05:26 +0900367import-order-style = pep8
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500368
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200369[flake8:local-plugins]
370extension =
371 T102 = checks:import_no_clients_in_api_and_scenario_tests
372 T104 = checks:scenario_tests_need_service_tags
373 T105 = checks:no_setup_teardown_class_for_tests
374 T107 = checks:service_tags_not_in_module_path
375 T108 = checks:no_hyphen_at_end_of_rand_name
376 N322 = checks:no_mutable_default_args
377 T109 = checks:no_testtools_skip_decorator
378 T110 = checks:get_resources_on_service_clients
379 T111 = checks:delete_resources_on_service_clients
380 T112 = checks:dont_import_local_tempest_into_lib
381 T113 = checks:use_rand_uuid_instead_of_uuid4
382 T114 = checks:dont_use_config_in_tempest_lib
383 T115 = checks:dont_put_admin_tests_on_nonadmin_path
384 T116 = checks:unsupported_exception_attribute_PY3
385 T117 = checks:negative_test_attribute_always_applied_to_negative_tests
Takashi Kajinami2a5ef1b2021-11-29 15:48:25 +0900386 T118 = checks:no_log_warn
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200387paths =
388 ./tempest/hacking
389
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500390[testenv:releasenotes]
junboli173b11c2018-01-15 11:25:35 +0800391deps =
Ghanshyam Mann5c075cc2022-11-12 19:40:11 -0600392 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800393 -r{toxinidir}/doc/requirements.txt
junboli8bd00e32017-08-22 17:06:15 +0800394commands =
junboli173b11c2018-01-15 11:25:35 +0800395 rm -rf releasenotes/build
396 sphinx-build -a -E -W -d releasenotes/build/doctrees \
397 -b html releasenotes/source releasenotes/build/html
Martin Kopecdc844232020-12-24 15:57:53 +0000398allowlist_externals = rm
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200399
Masayuki Igawade1153b2019-07-30 18:02:07 +0900400[testenv:bashate]
Masayuki Igawade1153b2019-07-30 18:02:07 +0900401# if you want to test out some changes you have made to bashate
402# against tempest, just set BASHATE_INSTALL_PATH=/path/... to your
403# modified bashate tree
404deps =
405 {env:BASHATE_INSTALL_PATH:bashate}
Martin Kopecdc844232020-12-24 15:57:53 +0000406allowlist_externals = bash
Masayuki Igawade1153b2019-07-30 18:02:07 +0900407commands = bash -c "find {toxinidir}/tools \
408 -not \( -type d -name .?\* -prune \) \
409 -type f \
410 -name \*.sh \
Masayuki Igawafdd96442019-08-02 13:44:49 +0900411 -print0 | xargs -0 bashate -v -eE005,E042 -i E006"
Masayuki Igawade1153b2019-07-30 18:02:07 +0900412
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200413[testenv:pip-check-reqs]
414# Do not install test-requirements as that will pollute the virtualenv for
415# determining missing packages.
416# This also means that pip-check-reqs must be installed separately, outside
417# of the requirements.txt files
418deps = pip_check_reqs
419 -r{toxinidir}/requirements.txt
420commands=
421 pip-extra-reqs -d --ignore-file=tempest/tests/* tempest
422 pip-missing-reqs -d --ignore-file=tempest/tests/* tempest
Chandan Kumarac5c5532016-11-30 18:49:26 +0530423
424
425[testenv:bindep]
426# Do not install any requirements. We want this to be fast and work even if
427# system dependencies are missing, since it's used to tell you what system
428# dependencies are missing! This also means that bindep must be installed
429# separately, outside of the requirements files.
430deps = bindep
431commands = bindep test
Chandan Kumarb7affe42017-06-29 13:57:01 +0530432
433[testenv:plugin-sanity-check]
434# perform tempest plugin sanity
Martin Kopecdc844232020-12-24 15:57:53 +0000435allowlist_externals = bash
Chandan Kumarb7affe42017-06-29 13:57:01 +0530436commands =
437 bash tools/tempest-plugin-sanity.sh
Ghanshyam Mann83d13e52020-12-29 13:13:40 -0600438
439[testenv:stestr-master]
440envdir = .tox/tempest
441sitepackages = {[tempestenv]sitepackages}
442basepython = {[tempestenv]basepython}
443setenv = {[tempestenv]setenv}
444deps = {[tempestenv]deps}
445# The below command install stestr master version and run smoke tests
446commands =
447 find . -type f -name "*.pyc" -delete
448 pip install -U git+https://github.com/mtreinish/stestr
449 tempest run --regex '\[.*\bsmoke\b.*\]' {posargs}