blob: edfee15b3080391459fb3738c77143d20d0909de [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]
7sitepackages = True
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
Matthew Treinish5b7626a2014-09-23 17:39:38 -040010deps = -r{toxinidir}/requirements.txt
11
12[testenv]
13setenv = VIRTUAL_ENV={envdir}
14 OS_TEST_PATH=./tempest/tests
Matthew Treinish7228e112013-10-03 14:58:54 +000015usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050016install_command = pip install -U {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040017whitelist_externals = *
18deps = -r{toxinidir}/requirements.txt
19 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050020commands =
21 find . -type f -name "*.pyc" -delete
22 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000023
Jon Grimm270bd7f2014-08-05 18:11:29 +000024[testenv:genconfig]
25commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
26
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000027[testenv:cover]
28setenv = OS_TEST_PATH=./tempest/tests
29commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
30
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040031[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040032sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040033# 'all' includes slow tests
Matthew Treinish5b7626a2014-09-23 17:39:38 -040034setenv = {[tempestenv]setenv}
David Kranzf9695d22014-10-27 11:43:52 -040035 OS_TEST_TIMEOUT=1200
Matthew Treinish5b7626a2014-09-23 17:39:38 -040036deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040037commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050038 find . -type f -name "*.pyc" -delete
Attila Fazekas5739ac12014-02-20 07:09:07 +010039 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040040
Monty Taylor8d4c90c2013-05-02 14:33:18 -040041[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040042sitepackages = {[tempestenv]sitepackages}
43setenv = {[tempestenv]setenv}
44deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040045# The regex below is used to select which tests to run and exclude the slow tag:
46# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040047commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050048 find . -type f -name "*.pyc" -delete
Matthew Treinish1ee43982013-12-06 21:08:31 +000049 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040050
Matthew Treinish99288cd2014-02-10 09:21:51 -050051[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040052sitepackages = {[tempestenv]sitepackages}
53setenv = {[tempestenv]setenv}
54deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050055# The regex below is used to select which tests to run and exclude the slow tag:
56# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
57commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050058 find . -type f -name "*.pyc" -delete
Matthew Treinish99288cd2014-02-10 09:21:51 -050059 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
60
David Kranzc5d52e92013-08-23 11:47:36 -040061[testenv:heat-slow]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040062sitepackages = {[tempestenv]sitepackages}
63setenv = {[tempestenv]setenv}
64 OS_TEST_TIMEOUT=1200
65deps = {[tempestenv]deps}
David Kranzc5d52e92013-08-23 11:47:36 -040066# The regex below is used to select heat api/scenario tests tagged as slow.
67commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050068 find . -type f -name "*.pyc" -delete
Matthew Treinish20095902014-04-03 14:06:32 -040069 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040070
Joe Gordon40028152013-08-26 17:53:29 -040071[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040072sitepackages = {[tempestenv]sitepackages}
73setenv = {[tempestenv]setenv}
74deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040075commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050076 find . -type f -name "*.pyc" -delete
Joe Gordon40028152013-08-26 17:53:29 -040077 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
78
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 =
Sean Daguec7b4d882014-11-25 08:18:23 -050084 find . -type f -name "*.pyc" -delete
Matthew Treinish1ee43982013-12-06 21:08:31 +000085 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {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 =
Sean Daguec7b4d882014-11-25 08:18:23 -050095 find . -type f -name "*.pyc" -delete
Matthew Treinish1ee43982013-12-06 21:08:31 +000096 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {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]
109commands = python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400110
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400111[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000112commands =
113 flake8 {posargs}
114 {toxinidir}/tools/config/check_uptodate.sh
115
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400116[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400117local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400118import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400119
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700120[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700121# 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 -0400122# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400123# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400124# E129 skipped because it is too limiting when combined with other rules
Matthew Treinish75d540d2014-08-15 14:19:03 -0400125# H305 skipped because it is inconsistent between python versions
Matthew Treinish1d14c542014-06-17 20:25:40 -0400126# Skipped because of new hacking 0.9: H405,H904
Matthew Treinish75d540d2014-08-15 14:19:03 -0400127ignore = E125,H402,E123,E129,H404,H405,H904,H305
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700128show-source = True
129exclude = .git,.venv,.tox,dist,doc,openstack,*egg