blob: c07dbbf963137a22e48b5fc10b9d1811a9341ea2 [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
20commands = bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000021
Jon Grimm270bd7f2014-08-05 18:11:29 +000022[testenv:genconfig]
23commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
24
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000025[testenv:cover]
26setenv = OS_TEST_PATH=./tempest/tests
27commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
28
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040029[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040030sitepackages = {[tempestenv]sitepackages}
31setenv = {[tempestenv]setenv}
32deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040033commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010034 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040035
Monty Taylor8d4c90c2013-05-02 14:33:18 -040036[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040037sitepackages = {[tempestenv]sitepackages}
38setenv = {[tempestenv]setenv}
39deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040040# The regex below is used to select which tests to run and exclude the slow tag:
41# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040042commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000043 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040044
Matthew Treinish99288cd2014-02-10 09:21:51 -050045[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040046sitepackages = {[tempestenv]sitepackages}
47setenv = {[tempestenv]setenv}
48deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050049# The regex below is used to select which tests to run and exclude the slow tag:
50# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
51commands =
52 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
53
David Kranzc5d52e92013-08-23 11:47:36 -040054[testenv:heat-slow]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040055sitepackages = {[tempestenv]sitepackages}
56setenv = {[tempestenv]setenv}
57 OS_TEST_TIMEOUT=1200
58deps = {[tempestenv]deps}
David Kranzc5d52e92013-08-23 11:47:36 -040059# The regex below is used to select heat api/scenario tests tagged as slow.
60commands =
Matthew Treinish20095902014-04-03 14:06:32 -040061 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040062
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 =
68 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
69
Monty Taylor8d4c90c2013-05-02 14:33:18 -040070[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040071sitepackages = {[tempestenv]sitepackages}
72setenv = {[tempestenv]setenv}
73deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040074commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000075 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040076
Joe Gordond2796292013-11-14 12:55:55 -080077[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040078sitepackages = {[tempestenv]sitepackages}
79setenv = {[tempestenv]setenv}
80deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080081# This is still serial because neutron doesn't work with parallel. See:
82# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
83# job would fail if we moved it to parallel.
84commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000085 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080086
Matthew Treinishcee11772013-07-02 17:50:41 -040087[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040088sitepackages = {[tempestenv]sitepackages}
89setenv = {[tempestenv]setenv}
90deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -040091commands =
David Kranzea202d72014-10-10 11:37:12 -040092 run-tempest-stress '{posargs}'
Matthew Treinishcee11772013-07-02 17:50:41 -040093
Sean Dagueb56052b2013-05-21 17:57:41 -040094[testenv:venv]
95commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -040096
Matthew Treinish8bd013e2014-06-18 21:58:32 -040097[testenv:docs]
98commands = python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -040099
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400100[testenv:pep8]
Adam Gandelmana10f7682014-08-25 15:47:08 -0700101setenv = PYTHONHASHSEED=0
Matthew Treinish3d468112013-10-24 21:49:14 +0000102commands =
103 flake8 {posargs}
104 {toxinidir}/tools/config/check_uptodate.sh
105
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400106[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400107local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400108import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400109
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700110[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700111# 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 -0400112# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400113# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400114# E129 skipped because it is too limiting when combined with other rules
Matthew Treinish75d540d2014-08-15 14:19:03 -0400115# H305 skipped because it is inconsistent between python versions
Matthew Treinish1d14c542014-06-17 20:25:40 -0400116# Skipped because of new hacking 0.9: H405,H904
Matthew Treinish75d540d2014-08-15 14:19:03 -0400117ignore = E125,H402,E123,E129,H404,H405,H904,H305
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700118show-source = True
119exclude = .git,.venv,.tox,dist,doc,openstack,*egg