blob: e9b97413b19ba2dcbeee905d7fc9d22f36181950 [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
lvdongbing768c8072015-12-01 22:38:57 -05002envlist = pep8,py34,py27
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
11deps =
12 setuptools
13 -r{toxinidir}/requirements.txt
Matthew Treinish5b7626a2014-09-23 17:39:38 -040014
15[testenv]
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090016setenv =
17 VIRTUAL_ENV={envdir}
18 OS_TEST_PATH=./tempest/tests
yan.haifeng658544f2015-06-12 14:41:41 +080019passenv = 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
Matthew Treinish7228e112013-10-03 14:58:54 +000020usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050021install_command = pip install -U {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040022whitelist_externals = *
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090023deps =
24 -r{toxinidir}/requirements.txt
25 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050026commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090027 find . -type f -name "*.pyc" -delete
28 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000029
Jon Grimm270bd7f2014-08-05 18:11:29 +000030[testenv:genconfig]
David Paterson0bf52d42015-04-13 21:55:58 -040031commands = oslo-config-generator --config-file etc/config-generator.tempest.conf
Jon Grimm270bd7f2014-08-05 18:11:29 +000032
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000033[testenv:cover]
34setenv = OS_TEST_PATH=./tempest/tests
35commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
36
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040037[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040038sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040039# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090040setenv =
41 {[tempestenv]setenv}
42 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040043deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040044commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090045 find . -type f -name "*.pyc" -delete
46 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040047
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020048[testenv:all-plugin]
49sitepackages = True
50# 'all' includes slow tests
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090051setenv =
52 {[tempestenv]setenv}
53 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020054deps = {[tempestenv]deps}
55commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090056 find . -type f -name "*.pyc" -delete
57 bash tools/pretty_tox.sh '{posargs}'
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020058
Monty Taylor8d4c90c2013-05-02 14:33:18 -040059[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040060sitepackages = {[tempestenv]sitepackages}
61setenv = {[tempestenv]setenv}
62deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040063# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +090064# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040065commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090066 find . -type f -name "*.pyc" -delete
67 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040068
Matthew Treinish99288cd2014-02-10 09:21:51 -050069[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040070sitepackages = {[tempestenv]sitepackages}
71setenv = {[tempestenv]setenv}
72deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050073# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +090074# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish99288cd2014-02-10 09:21:51 -050075commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090076 find . -type f -name "*.pyc" -delete
77 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish99288cd2014-02-10 09:21:51 -050078
Monty Taylor8d4c90c2013-05-02 14:33:18 -040079[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040080sitepackages = {[tempestenv]sitepackages}
81setenv = {[tempestenv]setenv}
82deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040083commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090084 find . -type f -name "*.pyc" -delete
85 bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040086
Joe Gordond2796292013-11-14 12:55:55 -080087[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040088sitepackages = {[tempestenv]sitepackages}
89setenv = {[tempestenv]setenv}
90deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080091# This is still serial because neutron doesn't work with parallel. See:
92# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
93# job would fail if we moved it to parallel.
94commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +090095 find . -type f -name "*.pyc" -delete
96 bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080097
Matthew Treinishcee11772013-07-02 17:50:41 -040098[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040099sitepackages = {[tempestenv]sitepackages}
100setenv = {[tempestenv]setenv}
101deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -0400102commands =
David Kranz03fbe5c2014-11-11 15:29:00 -0500103 run-tempest-stress {posargs}
Matthew Treinishcee11772013-07-02 17:50:41 -0400104
Sean Dagueb56052b2013-05-21 17:57:41 -0400105[testenv:venv]
106commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400107
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400108[testenv:docs]
Mathew Oddenb389faa2015-07-30 20:24:08 +0000109commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900110 python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400111
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400112[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000113commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900114 flake8 {posargs}
115 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000116
Chris Hoge7579c1a2015-02-26 14:12:15 -0800117[testenv:uuidgen]
118commands =
Masayuki Igawad81d3ce2016-04-20 15:00:54 +0900119 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600120
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400121[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400122local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400123import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400124
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700125[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700126# 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 -0400127# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400128# E129 skipped because it is too limiting when combined with other rules
Joe Gordon28788b42015-02-25 12:42:37 -0800129# Skipped because of new hacking 0.9: H405
Ken'ichi Ohmichi2e2ee192015-11-19 09:48:27 +0000130ignore = E125,E123,E129
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700131show-source = True
132exclude = .git,.venv,.tox,dist,doc,openstack,*egg
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500133
134[testenv:releasenotes]
135commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html