blob: 9f52f0d1787d0c0e3e4d51a8b12bef89f6551ee0 [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}
David Kranzf9695d22014-10-27 11:43:52 -040031# 'all' includes slow tests
Matthew Treinish5b7626a2014-09-23 17:39:38 -040032setenv = {[tempestenv]setenv}
David Kranzf9695d22014-10-27 11:43:52 -040033 OS_TEST_TIMEOUT=1200
Matthew Treinish5b7626a2014-09-23 17:39:38 -040034deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040035commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010036 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040037
Monty Taylor8d4c90c2013-05-02 14:33:18 -040038[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040039sitepackages = {[tempestenv]sitepackages}
40setenv = {[tempestenv]setenv}
41deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040042# The regex below is used to select which tests to run and exclude the slow tag:
43# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040044commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000045 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040046
Matthew Treinish99288cd2014-02-10 09:21:51 -050047[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040048sitepackages = {[tempestenv]sitepackages}
49setenv = {[tempestenv]setenv}
50deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050051# The regex below is used to select which tests to run and exclude the slow tag:
52# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
53commands =
54 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
55
David Kranzc5d52e92013-08-23 11:47:36 -040056[testenv:heat-slow]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040057sitepackages = {[tempestenv]sitepackages}
58setenv = {[tempestenv]setenv}
59 OS_TEST_TIMEOUT=1200
60deps = {[tempestenv]deps}
David Kranzc5d52e92013-08-23 11:47:36 -040061# The regex below is used to select heat api/scenario tests tagged as slow.
62commands =
Matthew Treinish20095902014-04-03 14:06:32 -040063 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040064
Joe Gordon40028152013-08-26 17:53:29 -040065[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040066sitepackages = {[tempestenv]sitepackages}
67setenv = {[tempestenv]setenv}
68deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040069commands =
70 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
71
Monty Taylor8d4c90c2013-05-02 14:33:18 -040072[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040073sitepackages = {[tempestenv]sitepackages}
74setenv = {[tempestenv]setenv}
75deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040076commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000077 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {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 =
Matthew Treinish1ee43982013-12-06 21:08:31 +000087 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080088
Matthew Treinishcee11772013-07-02 17:50:41 -040089[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040090sitepackages = {[tempestenv]sitepackages}
91setenv = {[tempestenv]setenv}
92deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -040093commands =
David Kranzea202d72014-10-10 11:37:12 -040094 run-tempest-stress '{posargs}'
Matthew Treinishcee11772013-07-02 17:50:41 -040095
Sean Dagueb56052b2013-05-21 17:57:41 -040096[testenv:venv]
97commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -040098
Matthew Treinish8bd013e2014-06-18 21:58:32 -040099[testenv:docs]
100commands = python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400101
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400102[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000103commands =
104 flake8 {posargs}
105 {toxinidir}/tools/config/check_uptodate.sh
106
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400107[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400108local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400109import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400110
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700111[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700112# 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 -0400113# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400114# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400115# E129 skipped because it is too limiting when combined with other rules
Matthew Treinish75d540d2014-08-15 14:19:03 -0400116# H305 skipped because it is inconsistent between python versions
Matthew Treinish1d14c542014-06-17 20:25:40 -0400117# Skipped because of new hacking 0.9: H405,H904
Matthew Treinish75d540d2014-08-15 14:19:03 -0400118ignore = E125,H402,E123,E129,H404,H405,H904,H305
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700119show-source = True
120exclude = .git,.venv,.tox,dist,doc,openstack,*egg