blob: b495fd691f600daa126f56f28c8de63e8c855c28 [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
Matthew Treinish3460aaa2015-05-11 22:18:00 -04002envlist = pep8,py27,py34
Matthew Treinish7228e112013-10-03 14:58:54 +00003minversion = 1.6
4skipsdist = 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
Jay Pipesa6aa5f22012-07-24 19:40:29 -04008setenv = VIRTUAL_ENV={envdir}
Matthew Treinish87f772c2013-12-16 20:07:42 +00009 OS_TEST_PATH=./tempest/test_discover
Jeremy Stanley0ae5d522014-12-29 19:21:42 +000010deps = setuptools
11 -r{toxinidir}/requirements.txt
Matthew Treinish5b7626a2014-09-23 17:39:38 -040012
13[testenv]
14setenv = VIRTUAL_ENV={envdir}
15 OS_TEST_PATH=./tempest/tests
Matthew Treinish43073a22015-05-14 09:03:05 -040016passenv = OS_STDOUT_CAPTURE
17 OS_STDERR_CAPTURE
18 OS_TEST_TIMEOUT
19 OS_TEST_LOCK_PATH
20 OS_TEST_PATH
21 TEMPEST_CONFIG
22 TEMPEST_CONFIG_DIR
Matthew Treinish7228e112013-10-03 14:58:54 +000023usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050024install_command = pip install -U {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040025whitelist_externals = *
26deps = -r{toxinidir}/requirements.txt
27 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050028commands =
29 find . -type f -name "*.pyc" -delete
30 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000031
Jon Grimm270bd7f2014-08-05 18:11:29 +000032[testenv:genconfig]
33commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
34
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000035[testenv:cover]
36setenv = OS_TEST_PATH=./tempest/tests
37commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
38
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040039[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040040sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040041# 'all' includes slow tests
Matthew Treinish5b7626a2014-09-23 17:39:38 -040042setenv = {[tempestenv]setenv}
David Kranzf9695d22014-10-27 11:43:52 -040043 OS_TEST_TIMEOUT=1200
Matthew Treinish5b7626a2014-09-23 17:39:38 -040044deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040045commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050046 find . -type f -name "*.pyc" -delete
Attila Fazekas5739ac12014-02-20 07:09:07 +010047 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040048
Monty Taylor8d4c90c2013-05-02 14:33:18 -040049[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040050sitepackages = {[tempestenv]sitepackages}
51setenv = {[tempestenv]setenv}
52deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040053# The regex below is used to select which tests to run and exclude the slow tag:
54# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040055commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050056 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040057 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040058
Matthew Treinish99288cd2014-02-10 09:21:51 -050059[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040060sitepackages = {[tempestenv]sitepackages}
61setenv = {[tempestenv]setenv}
62deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050063# The regex below is used to select which tests to run and exclude the slow tag:
64# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
65commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050066 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040067 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish99288cd2014-02-10 09:21:51 -050068
Joe Gordon40028152013-08-26 17:53:29 -040069[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040070sitepackages = {[tempestenv]sitepackages}
71setenv = {[tempestenv]setenv}
72deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040073commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050074 find . -type f -name "*.pyc" -delete
Joe Gordon40028152013-08-26 17:53:29 -040075 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
76
Monty Taylor8d4c90c2013-05-02 14:33:18 -040077[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040078sitepackages = {[tempestenv]sitepackages}
79setenv = {[tempestenv]setenv}
80deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040081commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050082 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040083 bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040084
Joe Gordond2796292013-11-14 12:55:55 -080085[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040086sitepackages = {[tempestenv]sitepackages}
87setenv = {[tempestenv]setenv}
88deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080089# This is still serial because neutron doesn't work with parallel. See:
90# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
91# job would fail if we moved it to parallel.
92commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050093 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040094 bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080095
Matthew Treinishcee11772013-07-02 17:50:41 -040096[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040097sitepackages = {[tempestenv]sitepackages}
98setenv = {[tempestenv]setenv}
99deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -0400100commands =
David Kranz03fbe5c2014-11-11 15:29:00 -0500101 run-tempest-stress {posargs}
Matthew Treinishcee11772013-07-02 17:50:41 -0400102
Sean Dagueb56052b2013-05-21 17:57:41 -0400103[testenv:venv]
104commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400105
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400106[testenv:docs]
107commands = python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400108
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400109[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000110commands =
111 flake8 {posargs}
112 {toxinidir}/tools/config/check_uptodate.sh
Chris Hoge7579c1a2015-02-26 14:12:15 -0800113 python tools/check_uuid.py
Matthew Treinish3d468112013-10-24 21:49:14 +0000114
Chris Hoge7579c1a2015-02-26 14:12:15 -0800115[testenv:uuidgen]
116commands =
117 python tools/check_uuid.py --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600118
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400119[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400120local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400121import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400122
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700123[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700124# 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 -0400125# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400126# E129 skipped because it is too limiting when combined with other rules
Joe Gordon28788b42015-02-25 12:42:37 -0800127# Skipped because of new hacking 0.9: H405
Joe Gordona62baa02015-02-25 12:51:46 -0800128ignore = E125,E123,E129,H404,H405
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700129show-source = True
130exclude = .git,.venv,.tox,dist,doc,openstack,*egg