blob: cd1879ef06741149d7330ef67678356c5a8af1bd [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
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020043[testenv:all-plugin]
44sitepackages = True
45# 'all' includes slow tests
46setenv = {[tempestenv]setenv}
47 OS_TEST_TIMEOUT=1200
48deps = {[tempestenv]deps}
49commands =
50 find . -type f -name "*.pyc" -delete
51 bash tools/pretty_tox.sh '{posargs}'
52
Monty Taylor8d4c90c2013-05-02 14:33:18 -040053[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040054sitepackages = {[tempestenv]sitepackages}
55setenv = {[tempestenv]setenv}
56deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040057# 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
Matthew Treinish83d2ec42013-07-30 16:37:32 -040059commands =
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.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040062
Matthew Treinish99288cd2014-02-10 09:21:51 -050063[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040064sitepackages = {[tempestenv]sitepackages}
65setenv = {[tempestenv]setenv}
66deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050067# The regex below is used to select which tests to run and exclude the slow tag:
68# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
69commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050070 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040071 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish99288cd2014-02-10 09:21:51 -050072
Joe Gordon40028152013-08-26 17:53:29 -040073[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040074sitepackages = {[tempestenv]sitepackages}
75setenv = {[tempestenv]setenv}
76deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040077commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050078 find . -type f -name "*.pyc" -delete
Joe Gordon40028152013-08-26 17:53:29 -040079 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
80
Monty Taylor8d4c90c2013-05-02 14:33:18 -040081[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040082sitepackages = {[tempestenv]sitepackages}
83setenv = {[tempestenv]setenv}
84deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040085commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050086 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040087 bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040088
Joe Gordond2796292013-11-14 12:55:55 -080089[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040090sitepackages = {[tempestenv]sitepackages}
91setenv = {[tempestenv]setenv}
92deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080093# This is still serial because neutron doesn't work with parallel. See:
94# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
95# job would fail if we moved it to parallel.
96commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050097 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040098 bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080099
Matthew Treinishcee11772013-07-02 17:50:41 -0400100[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400101sitepackages = {[tempestenv]sitepackages}
102setenv = {[tempestenv]setenv}
103deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -0400104commands =
David Kranz03fbe5c2014-11-11 15:29:00 -0500105 run-tempest-stress {posargs}
Matthew Treinishcee11772013-07-02 17:50:41 -0400106
Sean Dagueb56052b2013-05-21 17:57:41 -0400107[testenv:venv]
108commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400109
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400110[testenv:docs]
Mathew Oddenb389faa2015-07-30 20:24:08 +0000111# The sample config file we generate is included in the sphinxdoc, so build that first.
112commands =
113 oslo-config-generator --config-file tools/config/config-generator.tempest.conf --output-file doc/source/_static/tempest.conf
114 python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400115
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400116[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000117commands =
118 flake8 {posargs}
119 {toxinidir}/tools/config/check_uptodate.sh
Chris Hoge7579c1a2015-02-26 14:12:15 -0800120 python tools/check_uuid.py
Matthew Treinish3d468112013-10-24 21:49:14 +0000121
Chris Hoge7579c1a2015-02-26 14:12:15 -0800122[testenv:uuidgen]
123commands =
124 python tools/check_uuid.py --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600125
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400126[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400127local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400128import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400129
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700130[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700131# 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 -0400132# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400133# E129 skipped because it is too limiting when combined with other rules
Joe Gordon28788b42015-02-25 12:42:37 -0800134# Skipped because of new hacking 0.9: H405
Joe Gordona62baa02015-02-25 12:51:46 -0800135ignore = E125,E123,E129,H404,H405
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700136show-source = True
137exclude = .git,.venv,.tox,dist,doc,openstack,*egg