blob: e861c8482460a0db597cd9dee35a2ca691290402 [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
Ghanshyam Mann551e8d72020-02-04 09:04:30 -06002envlist = pep8,py36,py37,bashate,pip-check-reqs
Ghanshyam1c680fd2020-01-20 11:43:29 -06003minversion = 3.1.1
Matthew Treinish7228e112013-10-03 14:58:54 +00004skipsdist = True
Ghanshyam1c680fd2020-01-20 11:43:29 -06005ignore_basepython_conflict = True
Jay Pipesa6aa5f22012-07-24 19:40:29 -04006
Matthew Treinish5b7626a2014-09-23 17:39:38 -04007[tempestenv]
Lee Yarwoodbc9fe8e2020-01-28 21:27:59 +00008basepython = python3
Joe Gordon9f1612e2015-01-28 11:23:43 -08009sitepackages = False
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090010setenv =
11 VIRTUAL_ENV={envdir}
12 OS_TEST_PATH=./tempest/test_discover
13deps =
caoyuan349ba752019-04-23 19:40:06 +080014 -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
Chris Dent9b4c50c2018-10-03 10:24:40 +010026passenv = 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 GABBI_TEMPEST_PATH
Matthew Treinish7228e112013-10-03 14:58:54 +000027usedevelop = True
Andreas Jaeger880d9432017-12-01 07:38:54 +010028install_command = pip install {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040029whitelist_externals = *
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090030deps =
caoyuan349ba752019-04-23 19:40:06 +080031 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090032 -r{toxinidir}/requirements.txt
33 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050034commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090035 find . -type f -name "*.pyc" -delete
Masayuki Igawad0b8ebd2017-09-14 14:51:25 -060036 stestr --test-path ./tempest/tests run {posargs}
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000037
Jon Grimm270bd7f2014-08-05 18:11:29 +000038[testenv:genconfig]
Matthew Treinishbdef1c72016-06-21 18:06:49 -040039commands = oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf
Jon Grimm270bd7f2014-08-05 18:11:29 +000040
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000041[testenv:cover]
Matthew Treinish069d8282017-11-28 19:19:27 -050042setenv =
43 {[testenv]setenv}
44 PYTHON=coverage run --source tempest --parallel-mode
45commands =
46 coverage erase
47 find . -type f -name "*.pyc" -delete
48 stestr --test-path ./tempest/tests run {posargs}
49 coverage combine
50 coverage html -d cover
51 coverage xml -o cover/coverage.xml
52 coverage report
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000053
Manik Bindlish8a7aaa52018-11-30 10:22:30 +000054[testenv:debug]
Manik Bindlish8a7aaa52018-11-30 10:22:30 +000055commands = oslo_debug_helper -t tempest/tests {posargs}
56
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040057[testenv:all]
Matthew Treinish0e25a902016-04-29 16:38:51 -040058envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -040059sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -060060basepython = {[tempestenv]basepython}
David Kranzf9695d22014-10-27 11:43:52 -040061# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090062setenv =
63 {[tempestenv]setenv}
64 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040065deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040066commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090067 find . -type f -name "*.pyc" -delete
Masayuki Igawafe0de682019-05-21 17:04:28 +090068 tempest run --regex {posargs:''}
Matthew Treinish87af1bb2013-06-17 15:29:10 -040069
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020070[testenv:all-plugin]
Andrea Frittoli35d12ca2018-02-13 15:42:25 +000071# DEPRECATED
72# NOTE(andreaf) The all-plugin tox env uses sitepackages
73# so that plugins installed outsite of Tempest virtual environment
74# can be discovered. After the implementation during the Queens
75# release cycle of the goal of moving Tempest plugins in dedicated
76# git repos, this environment should not be used anymore. "all"
77# should be used instead with the appropriate regex filtering.
78sitepackages = True
79# 'all' includes slow tests
80setenv =
81 {[tempestenv]setenv}
82 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Ghanshyam1c680fd2020-01-20 11:43:29 -060083basepython = {[tempestenv]basepython}
Andrea Frittoli35d12ca2018-02-13 15:42:25 +000084deps = {[tempestenv]deps}
85commands =
86 echo "WARNING: The all-plugin env is deprecated and will be removed"
87 echo "WARNING Please use the 'all' environment for Tempest plugins."
88 find . -type f -name "*.pyc" -delete
Masayuki Igawafe0de682019-05-21 17:04:28 +090089 tempest run --regex {posargs:''}
Andrea Frittoli35d12ca2018-02-13 15:42:25 +000090
91[testenv:all-site-packages]
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020092sitepackages = True
93# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090094setenv =
95 {[tempestenv]setenv}
96 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Ghanshyam1c680fd2020-01-20 11:43:29 -060097basepython = {[tempestenv]basepython}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020098deps = {[tempestenv]deps}
99commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900100 find . -type f -name "*.pyc" -delete
Masayuki Igawafe0de682019-05-21 17:04:28 +0900101 tempest run --regex {posargs:''}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +0200102
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400103[testenv:full]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400104envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400105sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600106basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400107setenv = {[tempestenv]setenv}
108deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -0400109# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +0900110# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Masayuki Igawaac0b1712018-03-09 16:20:42 +0900111# FIXME: We can replace it with the `--black-regex` option to exclude tests now.
Matthew Treinish83d2ec42013-07-30 16:37:32 -0400112commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900113 find . -type f -name "*.pyc" -delete
Sean Dague49505df2017-03-01 11:35:58 -0500114 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
115 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' {posargs}
Matthew Treinish83d2ec42013-07-30 16:37:32 -0400116
Attila Fazekas3f219f52018-03-01 16:50:10 +0000117[testenv:full-parallel]
118envdir = .tox/tempest
119sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600120basepython = {[tempestenv]basepython}
Attila Fazekas3f219f52018-03-01 16:50:10 +0000121setenv = {[tempestenv]setenv}
122deps = {[tempestenv]deps}
123# The regex below is used to select all tempest scenario and including the non slow api tests
124commands =
125 find . -type f -name "*.pyc" -delete
126 tempest run --regex '(^tempest\.scenario.*)|(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
127
Ghanshyam5072a242019-07-03 14:40:53 +0000128[testenv:integrated-network]
129envdir = .tox/tempest
130sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600131basepython = {[tempestenv]basepython}
Ghanshyam5072a242019-07-03 14:40:53 +0000132setenv = {[tempestenv]setenv}
133deps = {[tempestenv]deps}
134# The regex below is used to select which tests to run and exclude the slow tag and
135# tests listed in blacklist file:
136commands =
137 find . -type f -name "*.pyc" -delete
138 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-networking-blacklist.txt {posargs}
139 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-networking-blacklist.txt {posargs}
140
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000141[testenv:integrated-compute]
142envdir = .tox/tempest
143sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600144basepython = {[tempestenv]basepython}
Ghanshyamee7fd1f2019-07-05 09:36:57 +0000145setenv = {[tempestenv]setenv}
146deps = {[tempestenv]deps}
147# The regex below is used to select which tests to run and exclude the slow tag and
148# tests listed in blacklist file:
149commands =
150 find . -type f -name "*.pyc" -delete
151 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-compute-blacklist.txt {posargs}
152 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-compute-blacklist.txt {posargs}
153
Ghanshyam31609dc2019-07-05 09:23:37 +0000154[testenv:integrated-placement]
155envdir = .tox/tempest
156sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600157basepython = {[tempestenv]basepython}
Ghanshyam31609dc2019-07-05 09:23:37 +0000158setenv = {[tempestenv]setenv}
159deps = {[tempestenv]deps}
160# The regex below is used to select which tests to run and exclude the slow tag and
161# tests listed in blacklist file:
162commands =
163 find . -type f -name "*.pyc" -delete
164 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-placement-blacklist.txt {posargs}
165 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-placement-blacklist.txt {posargs}
166
Ghanshyam Manna6994452019-07-05 08:43:23 +0000167[testenv:integrated-storage]
168envdir = .tox/tempest
169sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600170basepython = {[tempestenv]basepython}
Ghanshyam Manna6994452019-07-05 08:43:23 +0000171setenv = {[tempestenv]setenv}
172deps = {[tempestenv]deps}
173# The regex below is used to select which tests to run and exclude the slow tag and
174# tests listed in blacklist file:
175commands =
176 find . -type f -name "*.pyc" -delete
177 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-storage-blacklist.txt {posargs}
178 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-storage-blacklist.txt {posargs}
179
Ghanshyam95358522019-07-05 08:58:32 +0000180[testenv:integrated-object-storage]
181envdir = .tox/tempest
182sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600183basepython = {[tempestenv]basepython}
Ghanshyam95358522019-07-05 08:58:32 +0000184setenv = {[tempestenv]setenv}
185deps = {[tempestenv]deps}
186# The regex below is used to select which tests to run and exclude the slow tag and
187# tests listed in blacklist file:
188commands =
189 find . -type f -name "*.pyc" -delete
190 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --blacklist_file ./tools/tempest-integrated-gate-object-storage-blacklist.txt {posargs}
191 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --blacklist_file ./tools/tempest-integrated-gate-object-storage-blacklist.txt {posargs}
192
Matthew Treinish99288cd2014-02-10 09:21:51 -0500193[testenv:full-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400194envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400195sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600196basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400197setenv = {[tempestenv]setenv}
198deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -0500199# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +0900200# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Masayuki Igawaac0b1712018-03-09 16:20:42 +0900201# FIXME: We can replace it with the `--black-regex` option to exclude tests now.
Matthew Treinish99288cd2014-02-10 09:21:51 -0500202commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900203 find . -type f -name "*.pyc" -delete
Masayuki Igawa730f59b2016-09-21 11:47:32 +0200204 tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs}
Matthew Treinish99288cd2014-02-10 09:21:51 -0500205
Andrea Frittolib838af92017-03-06 15:11:13 +0000206[testenv:scenario]
207envdir = .tox/tempest
208sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600209basepython = {[tempestenv]basepython}
Andrea Frittolib838af92017-03-06 15:11:13 +0000210setenv = {[tempestenv]setenv}
211deps = {[tempestenv]deps}
212# The regex below is used to select all scenario tests
213commands =
214 find . -type f -name "*.pyc" -delete
215 tempest run --serial --regex '(^tempest\.scenario)' {posargs}
216
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400217[testenv:smoke]
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}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400223commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900224 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -0400225 tempest run --regex '\[.*\bsmoke\b.*\]' {posargs}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400226
Joe Gordond2796292013-11-14 12:55:55 -0800227[testenv:smoke-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400228envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400229sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600230basepython = {[tempestenv]basepython}
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400231setenv = {[tempestenv]setenv}
232deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -0800233# This is still serial because neutron doesn't work with parallel. See:
234# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
235# job would fail if we moved it to parallel.
236commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900237 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -0400238 tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs}
Joe Gordond2796292013-11-14 12:55:55 -0800239
ghanshyam10326c72018-08-01 08:53:00 +0000240[testenv:slow-serial]
241envdir = .tox/tempest
242sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600243basepython = {[tempestenv]basepython}
ghanshyam10326c72018-08-01 08:53:00 +0000244setenv = {[tempestenv]setenv}
245deps = {[tempestenv]deps}
246# The regex below is used to select the slow tagged tests to run serially:
247commands =
248 find . -type f -name "*.pyc" -delete
249 tempest run --serial --regex '\[.*\bslow\b.*\]' {posargs}
250
Ghanshyama0b8ca42019-07-17 09:46:41 +0000251[testenv:ipv6-only]
252envdir = .tox/tempest
253sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600254basepython = {[tempestenv]basepython}
Ghanshyama0b8ca42019-07-17 09:46:41 +0000255setenv = {[tempestenv]setenv}
256deps = {[tempestenv]deps}
257# Run only smoke and ipv6 tests. This env is used to tests
258# the ipv6 deployments and basic tests run fine so that we can
259# verify that services listen on IPv6 address.
260commands =
261 find . -type f -name "*.pyc" -delete
262 tempest run --regex '\[.*\bsmoke|ipv6|test_network_v6\b.*\]' {posargs}
263
Sean Dagueb56052b2013-05-21 17:57:41 -0400264[testenv:venv]
Matt Riedemannd5e92822018-01-25 11:25:57 -0500265deps =
caoyuan349ba752019-04-23 19:40:06 +0800266 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Matt Riedemannd5e92822018-01-25 11:25:57 -0500267 -r{toxinidir}/requirements.txt
268 -r{toxinidir}/doc/requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400269commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400270
Matthew Treinish0e25a902016-04-29 16:38:51 -0400271[testenv:venv-tempest]
272envdir = .tox/tempest
273sitepackages = {[tempestenv]sitepackages}
Ghanshyam1c680fd2020-01-20 11:43:29 -0600274basepython = {[tempestenv]basepython}
Matthew Treinish0e25a902016-04-29 16:38:51 -0400275setenv = {[tempestenv]setenv}
276deps = {[tempestenv]deps}
277commands = {posargs}
278
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400279[testenv:docs]
junboli173b11c2018-01-15 11:25:35 +0800280deps =
caoyuan349ba752019-04-23 19:40:06 +0800281 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800282 -r{toxinidir}/requirements.txt
283 -r{toxinidir}/doc/requirements.txt
Mathew Oddenb389faa2015-07-30 20:24:08 +0000284commands =
junboli173b11c2018-01-15 11:25:35 +0800285 rm -rf doc/build
Ihar Hrachyshka8032b2e2017-11-27 14:16:59 -0800286 sphinx-build -W -b html doc/source doc/build/html
junboli173b11c2018-01-15 11:25:35 +0800287whitelist_externals = rm
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400288
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900289[testenv:pdf-docs]
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900290deps = {[testenv:docs]deps}
291whitelist_externals =
292 make
293commands =
294 sphinx-build -W -b latex doc/source doc/build/pdf
295 make -C doc/build/pdf
296
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400297[testenv:pep8]
afazekas40fcb9b2019-03-08 11:25:11 +0100298deps =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100299 -r{toxinidir}/test-requirements.txt
afazekas40fcb9b2019-03-08 11:25:11 +0100300 autopep8
Matthew Treinish3d468112013-10-24 21:49:14 +0000301commands =
afazekas40fcb9b2019-03-08 11:25:11 +0100302 autopep8 --exit-code --max-line-length=79 --experimental --diff -r tempest setup.py
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900303 flake8 {posargs}
304 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000305
afazekas40fcb9b2019-03-08 11:25:11 +0100306[testenv:autopep8]
307deps = autopep8
afazekas40fcb9b2019-03-08 11:25:11 +0100308commands =
Attila Fazekasc07edb52019-03-17 15:38:03 +0100309 {toxinidir}/tools/format.sh
afazekas40fcb9b2019-03-08 11:25:11 +0100310
Chris Hoge7579c1a2015-02-26 14:12:15 -0800311[testenv:uuidgen]
312commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900313 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600314
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400315[hacking]
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400316import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400317
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700318[flake8]
caoyuan349ba752019-04-23 19:40:06 +0800319# 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 -0400320# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400321# E129 skipped because it is too limiting when combined with other rules
Stephen Finucanefc42cc62018-07-06 13:39:55 +0100322# W504 skipped because it is overeager and unnecessary
323ignore = E125,E123,E129,W504
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700324show-source = True
junboli8bd00e32017-08-22 17:06:15 +0800325exclude = .git,.venv,.tox,dist,doc,*egg,build
Jordan Pittier525ec712016-12-07 17:51:26 +0100326enable-extensions = H106,H203,H904
Masayuki Igawa134d9f72017-02-10 18:05:26 +0900327import-order-style = pep8
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500328
Andreas Jaegerf27a3342020-03-29 10:21:39 +0200329[flake8:local-plugins]
330extension =
331 T102 = checks:import_no_clients_in_api_and_scenario_tests
332 T104 = checks:scenario_tests_need_service_tags
333 T105 = checks:no_setup_teardown_class_for_tests
334 T107 = checks:service_tags_not_in_module_path
335 T108 = checks:no_hyphen_at_end_of_rand_name
336 N322 = checks:no_mutable_default_args
337 T109 = checks:no_testtools_skip_decorator
338 T110 = checks:get_resources_on_service_clients
339 T111 = checks:delete_resources_on_service_clients
340 T112 = checks:dont_import_local_tempest_into_lib
341 T113 = checks:use_rand_uuid_instead_of_uuid4
342 T114 = checks:dont_use_config_in_tempest_lib
343 T115 = checks:dont_put_admin_tests_on_nonadmin_path
344 T116 = checks:unsupported_exception_attribute_PY3
345 T117 = checks:negative_test_attribute_always_applied_to_negative_tests
346paths =
347 ./tempest/hacking
348
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500349[testenv:releasenotes]
junboli173b11c2018-01-15 11:25:35 +0800350deps =
caoyuan349ba752019-04-23 19:40:06 +0800351 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
junboli173b11c2018-01-15 11:25:35 +0800352 -r{toxinidir}/requirements.txt
353 -r{toxinidir}/doc/requirements.txt
junboli8bd00e32017-08-22 17:06:15 +0800354commands =
junboli173b11c2018-01-15 11:25:35 +0800355 rm -rf releasenotes/build
356 sphinx-build -a -E -W -d releasenotes/build/doctrees \
357 -b html releasenotes/source releasenotes/build/html
358whitelist_externals = rm
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200359
Masayuki Igawade1153b2019-07-30 18:02:07 +0900360[testenv:bashate]
Masayuki Igawade1153b2019-07-30 18:02:07 +0900361# if you want to test out some changes you have made to bashate
362# against tempest, just set BASHATE_INSTALL_PATH=/path/... to your
363# modified bashate tree
364deps =
365 {env:BASHATE_INSTALL_PATH:bashate}
366whitelist_externals = bash
367commands = bash -c "find {toxinidir}/tools \
368 -not \( -type d -name .?\* -prune \) \
369 -type f \
370 -name \*.sh \
Masayuki Igawafdd96442019-08-02 13:44:49 +0900371 -print0 | xargs -0 bashate -v -eE005,E042 -i E006"
Masayuki Igawade1153b2019-07-30 18:02:07 +0900372
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200373[testenv:pip-check-reqs]
374# Do not install test-requirements as that will pollute the virtualenv for
375# determining missing packages.
376# This also means that pip-check-reqs must be installed separately, outside
377# of the requirements.txt files
378deps = pip_check_reqs
379 -r{toxinidir}/requirements.txt
380commands=
381 pip-extra-reqs -d --ignore-file=tempest/tests/* tempest
382 pip-missing-reqs -d --ignore-file=tempest/tests/* tempest
Chandan Kumarac5c5532016-11-30 18:49:26 +0530383
384
385[testenv:bindep]
386# Do not install any requirements. We want this to be fast and work even if
387# system dependencies are missing, since it's used to tell you what system
388# dependencies are missing! This also means that bindep must be installed
389# separately, outside of the requirements files.
390deps = bindep
391commands = bindep test
Chandan Kumarb7affe42017-06-29 13:57:01 +0530392
393[testenv:plugin-sanity-check]
394# perform tempest plugin sanity
395whitelist_externals = bash
396commands =
397 bash tools/tempest-plugin-sanity.sh