blob: 7abe989e11b46d7bdea665e89fcbfbb4cc342f4d [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
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000022[testenv:cover]
23setenv = OS_TEST_PATH=./tempest/tests
24commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
25
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040026[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040027sitepackages = {[tempestenv]sitepackages}
28setenv = {[tempestenv]setenv}
29deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040030commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010031 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040032
Monty Taylor8d4c90c2013-05-02 14:33:18 -040033[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040034sitepackages = {[tempestenv]sitepackages}
35setenv = {[tempestenv]setenv}
36deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040037# The regex below is used to select which tests to run and exclude the slow tag:
38# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040039commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000040 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040041
Matthew Treinish99288cd2014-02-10 09:21:51 -050042[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040043sitepackages = {[tempestenv]sitepackages}
44setenv = {[tempestenv]setenv}
45deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050046# 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
48commands =
49 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
50
David Kranzc5d52e92013-08-23 11:47:36 -040051[testenv:heat-slow]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040052sitepackages = {[tempestenv]sitepackages}
53setenv = {[tempestenv]setenv}
54 OS_TEST_TIMEOUT=1200
55deps = {[tempestenv]deps}
David Kranzc5d52e92013-08-23 11:47:36 -040056# The regex below is used to select heat api/scenario tests tagged as slow.
57commands =
Matthew Treinish20095902014-04-03 14:06:32 -040058 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040059
Joe Gordon40028152013-08-26 17:53:29 -040060[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040061sitepackages = {[tempestenv]sitepackages}
62setenv = {[tempestenv]setenv}
63deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040064commands =
65 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
66
Monty Taylor8d4c90c2013-05-02 14:33:18 -040067[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040068sitepackages = {[tempestenv]sitepackages}
69setenv = {[tempestenv]setenv}
70deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040071commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000072 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040073
Joe Gordond2796292013-11-14 12:55:55 -080074[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040075sitepackages = {[tempestenv]sitepackages}
76setenv = {[tempestenv]setenv}
77deps = {[tempestenv]deps}
Joe Gordond2796292013-11-14 12:55:55 -080078# This is still serial because neutron doesn't work with parallel. See:
79# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
80# job would fail if we moved it to parallel.
81commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000082 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080083
Matthew Treinishcee11772013-07-02 17:50:41 -040084[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040085sitepackages = {[tempestenv]sitepackages}
86setenv = {[tempestenv]setenv}
87deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -040088commands =
Matthew Treinish55e29b42014-05-07 01:04:17 -040089 run-tempest-stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -040090
Sean Dagueb56052b2013-05-21 17:57:41 -040091[testenv:venv]
92commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -040093
Matthew Treinish8bd013e2014-06-18 21:58:32 -040094[testenv:docs]
95commands = python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -040096
Jay Pipesa6aa5f22012-07-24 19:40:29 -040097[testenv:pep8]
Adam Gandelmana10f7682014-08-25 15:47:08 -070098setenv = PYTHONHASHSEED=0
Matthew Treinish3d468112013-10-24 21:49:14 +000099commands =
100 flake8 {posargs}
101 {toxinidir}/tools/config/check_uptodate.sh
102
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400103[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400104local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400105import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400106
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700107[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700108# 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 -0400109# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400110# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400111# E129 skipped because it is too limiting when combined with other rules
Matthew Treinish75d540d2014-08-15 14:19:03 -0400112# H305 skipped because it is inconsistent between python versions
Matthew Treinish1d14c542014-06-17 20:25:40 -0400113# Skipped because of new hacking 0.9: H405,H904
Matthew Treinish75d540d2014-08-15 14:19:03 -0400114ignore = E125,H402,E123,E129,H404,H405,H904,H305
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700115show-source = True
116exclude = .git,.venv,.tox,dist,doc,openstack,*egg