blob: f3fc8b71c2305214ff0fbef03f3d27bd4c2dc78a [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
Sean Dague5420d2d2014-06-25 18:12:13 -04002envlist = pep8,py27
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 Treinish7228e112013-10-03 14:58:54 +000016usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050017install_command = pip install -U {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040018whitelist_externals = *
19deps = -r{toxinidir}/requirements.txt
20 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050021commands =
22 find . -type f -name "*.pyc" -delete
23 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000024
Jon Grimm270bd7f2014-08-05 18:11:29 +000025[testenv:genconfig]
26commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
27
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000028[testenv:cover]
29setenv = OS_TEST_PATH=./tempest/tests
30commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
31
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040032[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040033sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040034# 'all' includes slow tests
Matthew Treinish5b7626a2014-09-23 17:39:38 -040035setenv = {[tempestenv]setenv}
David Kranzf9695d22014-10-27 11:43:52 -040036 OS_TEST_TIMEOUT=1200
Matthew Treinish5b7626a2014-09-23 17:39:38 -040037deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040038commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050039 find . -type f -name "*.pyc" -delete
Attila Fazekas5739ac12014-02-20 07:09:07 +010040 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040041
Monty Taylor8d4c90c2013-05-02 14:33:18 -040042[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040043sitepackages = {[tempestenv]sitepackages}
44setenv = {[tempestenv]setenv}
45deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040046# The regex below is used to select which tests to run and exclude the slow tag:
47# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040048commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050049 find . -type f -name "*.pyc" -delete
Matthew Treinish1ee43982013-12-06 21:08:31 +000050 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040051
Matthew Treinish99288cd2014-02-10 09:21:51 -050052[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040053sitepackages = {[tempestenv]sitepackages}
54setenv = {[tempestenv]setenv}
55deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050056# The regex below is used to select which tests to run and exclude the slow tag:
57# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
58commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050059 find . -type f -name "*.pyc" -delete
Matthew Treinish99288cd2014-02-10 09:21:51 -050060 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
61
David Kranzc5d52e92013-08-23 11:47:36 -040062[testenv:heat-slow]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040063sitepackages = {[tempestenv]sitepackages}
64setenv = {[tempestenv]setenv}
65 OS_TEST_TIMEOUT=1200
66deps = {[tempestenv]deps}
David Kranzc5d52e92013-08-23 11:47:36 -040067# The regex below is used to select heat api/scenario tests tagged as slow.
68commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050069 find . -type f -name "*.pyc" -delete
Matthew Treinish20095902014-04-03 14:06:32 -040070 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040071
Joe Gordon40028152013-08-26 17:53:29 -040072[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040073sitepackages = {[tempestenv]sitepackages}
74setenv = {[tempestenv]setenv}
75deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040076commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050077 find . -type f -name "*.pyc" -delete
Joe Gordon40028152013-08-26 17:53:29 -040078 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
79
Monty Taylor8d4c90c2013-05-02 14:33:18 -040080[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040081sitepackages = {[tempestenv]sitepackages}
82setenv = {[tempestenv]setenv}
83deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040084commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050085 find . -type f -name "*.pyc" -delete
Matthew Treinish1ee43982013-12-06 21:08:31 +000086 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040087
Joe Gordond2796292013-11-14 12:55:55 -080088[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040089sitepackages = {[tempestenv]sitepackages}
90setenv = {[tempestenv]setenv}
91deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080092# This is still serial because neutron doesn't work with parallel. See:
93# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
94# job would fail if we moved it to parallel.
95commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050096 find . -type f -name "*.pyc" -delete
Matthew Treinish1ee43982013-12-06 21:08:31 +000097 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080098
Matthew Treinishcee11772013-07-02 17:50:41 -040099[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400100sitepackages = {[tempestenv]sitepackages}
101setenv = {[tempestenv]setenv}
102deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -0400103commands =
David Kranz03fbe5c2014-11-11 15:29:00 -0500104 run-tempest-stress {posargs}
Matthew Treinishcee11772013-07-02 17:50:41 -0400105
Sean Dagueb56052b2013-05-21 17:57:41 -0400106[testenv:venv]
107commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400108
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400109[testenv:docs]
110commands = 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 =
114 flake8 {posargs}
115 {toxinidir}/tools/config/check_uptodate.sh
Chris Hoge7579c1a2015-02-26 14:12:15 -0800116 python tools/check_uuid.py
Matthew Treinish3d468112013-10-24 21:49:14 +0000117
Chris Hoge7579c1a2015-02-26 14:12:15 -0800118[testenv:uuidgen]
119commands =
120 python tools/check_uuid.py --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600121
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400122[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400123local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400124import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400125
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700126[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700127# 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 Treinish57160582014-06-09 17:13:48 -0400128# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400129# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400130# E129 skipped because it is too limiting when combined with other rules
Matthew Treinish75d540d2014-08-15 14:19:03 -0400131# H305 skipped because it is inconsistent between python versions
Matthew Treinish1d14c542014-06-17 20:25:40 -0400132# Skipped because of new hacking 0.9: H405,H904
Matthew Treinish75d540d2014-08-15 14:19:03 -0400133ignore = E125,H402,E123,E129,H404,H405,H904,H305
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700134show-source = True
135exclude = .git,.venv,.tox,dist,doc,openstack,*egg