blob: 24e3b5db1c8a1f12b8e60c5a2b604decab5d4c0a [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
rajat299b660852017-03-28 15:11:40 +05302envlist = pep8,py35,py27,pip-check-reqs
Ghanshyam3a59e1e2016-01-14 17:15:29 +09003minversion = 2.3.1
Matthew Treinish7228e112013-10-03 14:58:54 +00004skipsdist = True
Jay Pipesa6aa5f22012-07-24 19:40:29 -04005
Matthew Treinish5b7626a2014-09-23 17:39:38 -04006[tempestenv]
Joe Gordon9f1612e2015-01-28 11:23:43 -08007sitepackages = False
Masayuki Igawad81d3ce2016-04-20 15:00:54 +09008setenv =
9 VIRTUAL_ENV={envdir}
10 OS_TEST_PATH=./tempest/test_discover
Jordan Pittierec2eefe2017-01-09 12:57:37 +010011 BRANCH_NAME=master
12 CLIENT_NAME=tempest
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090013deps =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090014 -r{toxinidir}/requirements.txt
Matthew Treinish5b7626a2014-09-23 17:39:38 -040015
16[testenv]
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090017setenv =
18 VIRTUAL_ENV={envdir}
19 OS_TEST_PATH=./tempest/tests
ChangBo Guo(gcb)cd0374a2016-06-29 15:33:56 +080020 PYTHONWARNINGS=default::DeprecationWarning
Jordan Pittierec2eefe2017-01-09 12:57:37 +010021 BRANCH_NAME=master
22 CLIENT_NAME=tempest
Masayuki Igawaaa516f82017-07-12 13:56:04 +090023passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH OS_TEST_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
Matthew Treinish7228e112013-10-03 14:58:54 +000024usedevelop = True
Jordan Pittierec2eefe2017-01-09 12:57:37 +010025install_command =
26 {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040027whitelist_externals = *
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090028deps =
29 -r{toxinidir}/requirements.txt
30 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050031commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090032 find . -type f -name "*.pyc" -delete
Matthew Treinishc3fef9f2016-09-09 18:04:50 -040033 ostestr {posargs}
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000034
Jon Grimm270bd7f2014-08-05 18:11:29 +000035[testenv:genconfig]
Matthew Treinishbdef1c72016-06-21 18:06:49 -040036commands = oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf
Jon Grimm270bd7f2014-08-05 18:11:29 +000037
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000038[testenv:cover]
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000039commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
40
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040041[testenv:all]
Matthew Treinish0e25a902016-04-29 16:38:51 -040042envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -040043sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040044# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090045setenv =
46 {[tempestenv]setenv}
47 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040048deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040049commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090050 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -040051 tempest run --regex {posargs}
Matthew Treinish87af1bb2013-06-17 15:29:10 -040052
Matthew Treinish3a9d3e72015-11-20 14:51:31 -050053[testenv:ostestr]
54sitepackages = {[tempestenv]sitepackages}
55# 'all' includes slow tests
56setenv =
57 {[tempestenv]setenv}
58 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
59deps = {[tempestenv]deps}
60commands =
61 find . -type f -name "*.pyc" -delete
62 ostestr {posargs}
63
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020064[testenv:all-plugin]
65sitepackages = True
66# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090067setenv =
68 {[tempestenv]setenv}
69 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020070deps = {[tempestenv]deps}
71commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090072 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -040073 tempest run --regex {posargs}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020074
Monty Taylor8d4c90c2013-05-02 14:33:18 -040075[testenv:full]
Matthew Treinish0e25a902016-04-29 16:38:51 -040076envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -040077sitepackages = {[tempestenv]sitepackages}
78setenv = {[tempestenv]setenv}
79deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040080# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +090081# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040082commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090083 find . -type f -name "*.pyc" -delete
Sean Dague49505df2017-03-01 11:35:58 -050084 tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
85 tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' {posargs}
Matthew Treinish83d2ec42013-07-30 16:37:32 -040086
Matthew Treinish99288cd2014-02-10 09:21:51 -050087[testenv:full-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -040088envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -040089sitepackages = {[tempestenv]sitepackages}
90setenv = {[tempestenv]setenv}
91deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050092# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +090093# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish99288cd2014-02-10 09:21:51 -050094commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090095 find . -type f -name "*.pyc" -delete
Masayuki Igawa730f59b2016-09-21 11:47:32 +020096 tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs}
Matthew Treinish99288cd2014-02-10 09:21:51 -050097
Andrea Frittolib838af92017-03-06 15:11:13 +000098[testenv:scenario]
99envdir = .tox/tempest
100sitepackages = {[tempestenv]sitepackages}
101setenv = {[tempestenv]setenv}
102deps = {[tempestenv]deps}
103# The regex below is used to select all scenario tests
104commands =
105 find . -type f -name "*.pyc" -delete
106 tempest run --serial --regex '(^tempest\.scenario)' {posargs}
107
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400108[testenv:smoke]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400109envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400110sitepackages = {[tempestenv]sitepackages}
111setenv = {[tempestenv]setenv}
112deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400113commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900114 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -0400115 tempest run --regex '\[.*\bsmoke\b.*\]' {posargs}
Monty Taylor8d4c90c2013-05-02 14:33:18 -0400116
Joe Gordond2796292013-11-14 12:55:55 -0800117[testenv:smoke-serial]
Matthew Treinish0e25a902016-04-29 16:38:51 -0400118envdir = .tox/tempest
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400119sitepackages = {[tempestenv]sitepackages}
120setenv = {[tempestenv]setenv}
121deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -0800122# This is still serial because neutron doesn't work with parallel. See:
123# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
124# job would fail if we moved it to parallel.
125commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900126 find . -type f -name "*.pyc" -delete
Matthew Treinish68c78712016-07-28 14:47:27 -0400127 tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs}
Joe Gordond2796292013-11-14 12:55:55 -0800128
Sean Dagueb56052b2013-05-21 17:57:41 -0400129[testenv:venv]
130commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400131
Matthew Treinish0e25a902016-04-29 16:38:51 -0400132[testenv:venv-tempest]
133envdir = .tox/tempest
134sitepackages = {[tempestenv]sitepackages}
135setenv = {[tempestenv]setenv}
136deps = {[tempestenv]deps}
137commands = {posargs}
138
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400139[testenv:docs]
Mathew Oddenb389faa2015-07-30 20:24:08 +0000140commands =
junboli8bd00e32017-08-22 17:06:15 +0800141 rm -rf doc/build
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900142 python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400143
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400144[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000145commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900146 flake8 {posargs}
147 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000148
Chris Hoge7579c1a2015-02-26 14:12:15 -0800149[testenv:uuidgen]
150commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900151 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600152
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400153[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400154local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400155import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400156
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700157[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700158# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/
Matthew Treinish96e9e882014-06-09 18:37:19 -0400159# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400160# E129 skipped because it is too limiting when combined with other rules
Ken'ichi Ohmichi2e2ee192015-11-19 09:48:27 +0000161ignore = E125,E123,E129
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700162show-source = True
junboli8bd00e32017-08-22 17:06:15 +0800163exclude = .git,.venv,.tox,dist,doc,*egg,build
Jordan Pittier525ec712016-12-07 17:51:26 +0100164enable-extensions = H106,H203,H904
Masayuki Igawa134d9f72017-02-10 18:05:26 +0900165import-order-style = pep8
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500166
167[testenv:releasenotes]
junboli8bd00e32017-08-22 17:06:15 +0800168commands =
169 rm -rf releasenotes/build
170 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
Jordan Pittiercefaa2b2016-07-22 13:04:26 +0200171
172[testenv:pip-check-reqs]
173# Do not install test-requirements as that will pollute the virtualenv for
174# determining missing packages.
175# This also means that pip-check-reqs must be installed separately, outside
176# of the requirements.txt files
177deps = pip_check_reqs
178 -r{toxinidir}/requirements.txt
179commands=
180 pip-extra-reqs -d --ignore-file=tempest/tests/* tempest
181 pip-missing-reqs -d --ignore-file=tempest/tests/* tempest
Chandan Kumarac5c5532016-11-30 18:49:26 +0530182
183
184[testenv:bindep]
185# Do not install any requirements. We want this to be fast and work even if
186# system dependencies are missing, since it's used to tell you what system
187# dependencies are missing! This also means that bindep must be installed
188# separately, outside of the requirements files.
189deps = bindep
190commands = bindep test
Chandan Kumarb7affe42017-06-29 13:57:01 +0530191
192[testenv:plugin-sanity-check]
193# perform tempest plugin sanity
194whitelist_externals = bash
195commands =
196 bash tools/tempest-plugin-sanity.sh