blob: cf7013d453ad265cf98eee0e87ecc9e630e0a746 [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
yan.haifeng658544f2015-06-12 14:41:41 +080016passenv = 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 +000017usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050018install_command = pip install -U {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040019whitelist_externals = *
20deps = -r{toxinidir}/requirements.txt
21 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050022commands =
23 find . -type f -name "*.pyc" -delete
24 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000025
Jon Grimm270bd7f2014-08-05 18:11:29 +000026[testenv:genconfig]
27commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
28
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000029[testenv:cover]
30setenv = OS_TEST_PATH=./tempest/tests
31commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
32
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040033[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040034sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040035# 'all' includes slow tests
Matthew Treinish5b7626a2014-09-23 17:39:38 -040036setenv = {[tempestenv]setenv}
David Kranzf9695d22014-10-27 11:43:52 -040037 OS_TEST_TIMEOUT=1200
Matthew Treinish5b7626a2014-09-23 17:39:38 -040038deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040039commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050040 find . -type f -name "*.pyc" -delete
Attila Fazekas5739ac12014-02-20 07:09:07 +010041 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040042
Monty Taylor8d4c90c2013-05-02 14:33:18 -040043[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040044sitepackages = {[tempestenv]sitepackages}
45setenv = {[tempestenv]setenv}
46deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040047# The regex below is used to select which tests to run and exclude the slow tag:
48# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040049commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050050 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040051 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040052
Matthew Treinish99288cd2014-02-10 09:21:51 -050053[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040054sitepackages = {[tempestenv]sitepackages}
55setenv = {[tempestenv]setenv}
56deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050057# The regex below is used to select which tests to run and exclude the slow tag:
58# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
59commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050060 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040061 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish99288cd2014-02-10 09:21:51 -050062
Joe Gordon40028152013-08-26 17:53:29 -040063[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040064sitepackages = {[tempestenv]sitepackages}
65setenv = {[tempestenv]setenv}
66deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040067commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050068 find . -type f -name "*.pyc" -delete
Joe Gordon40028152013-08-26 17:53:29 -040069 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
70
Monty Taylor8d4c90c2013-05-02 14:33:18 -040071[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040072sitepackages = {[tempestenv]sitepackages}
73setenv = {[tempestenv]setenv}
74deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040075commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050076 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040077 bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040078
Joe Gordond2796292013-11-14 12:55:55 -080079[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040080sitepackages = {[tempestenv]sitepackages}
81setenv = {[tempestenv]setenv}
82deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080083# This is still serial because neutron doesn't work with parallel. See:
84# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
85# job would fail if we moved it to parallel.
86commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050087 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040088 bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080089
Matthew Treinishcee11772013-07-02 17:50:41 -040090[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040091sitepackages = {[tempestenv]sitepackages}
92setenv = {[tempestenv]setenv}
93deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -040094commands =
David Kranz03fbe5c2014-11-11 15:29:00 -050095 run-tempest-stress {posargs}
Matthew Treinishcee11772013-07-02 17:50:41 -040096
Sean Dagueb56052b2013-05-21 17:57:41 -040097[testenv:venv]
98commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -040099
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400100[testenv:docs]
101commands = python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400102
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400103[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000104commands =
105 flake8 {posargs}
106 {toxinidir}/tools/config/check_uptodate.sh
Chris Hoge7579c1a2015-02-26 14:12:15 -0800107 python tools/check_uuid.py
Matthew Treinish3d468112013-10-24 21:49:14 +0000108
Chris Hoge7579c1a2015-02-26 14:12:15 -0800109[testenv:uuidgen]
110commands =
111 python tools/check_uuid.py --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600112
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400113[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400114local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400115import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400116
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700117[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700118# 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 -0400119# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400120# E129 skipped because it is too limiting when combined with other rules
Joe Gordon28788b42015-02-25 12:42:37 -0800121# Skipped because of new hacking 0.9: H405
Joe Gordona62baa02015-02-25 12:51:46 -0800122ignore = E125,E123,E129,H404,H405
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700123show-source = True
124exclude = .git,.venv,.tox,dist,doc,openstack,*egg