blob: 6ec0b2c9241363fe452b39eecd44ad577db4d291 [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
6[testenv]
7setenv = VIRTUAL_ENV={envdir}
Matthew Treinish87f772c2013-12-16 20:07:42 +00008 OS_TEST_PATH=./tempest/test_discover
Matthew Treinish256a21d2014-08-05 23:23:01 -04009 PYTHONHASHSEED=0
Matthew Treinish7228e112013-10-03 14:58:54 +000010usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050011install_command = pip install -U {opts} {packages}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040012
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000013[testenv:py26]
Matthew Treinishbf470612013-12-13 15:46:44 +000014setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish256a21d2014-08-05 23:23:01 -040015 PYTHONHASHSEED=0
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000016commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
17
18[testenv:py33]
Matthew Treinishbf470612013-12-13 15:46:44 +000019setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish256a21d2014-08-05 23:23:01 -040020 PYTHONHASHSEED=0
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000021commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
22
23[testenv:py27]
Matthew Treinishbf470612013-12-13 15:46:44 +000024setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish256a21d2014-08-05 23:23:01 -040025 PYTHONHASHSEED=0
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000026commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
27
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000028[testenv:cover]
29setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish256a21d2014-08-05 23:23:01 -040030 PYTHONHASHSEED=0
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000031commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
Matthew Treinish3a481812014-08-26 19:08:43 -040032deps = -r{toxinidir}/requirements.txt
33 -r{toxinidir}/test-requirements.txt
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000034
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040035[testenv:all]
Sean Daguea646d172014-02-20 18:50:41 -050036sitepackages = True
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040037commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010038 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040039
Monty Taylor8d4c90c2013-05-02 14:33:18 -040040[testenv:full]
Sean Daguea646d172014-02-20 18:50:41 -050041sitepackages = True
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]
48# The regex below is used to select which tests to run and exclude the slow tag:
49# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
50commands =
51 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
52
Matthew Treinish87af1bb2013-06-17 15:29:10 -040053[testenv:testr-full]
Sean Daguea646d172014-02-20 18:50:41 -050054sitepackages = True
Matthew Treinish87af1bb2013-06-17 15:29:10 -040055commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000056 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040057
David Kranzc5d52e92013-08-23 11:47:36 -040058[testenv:heat-slow]
Sean Daguea646d172014-02-20 18:50:41 -050059sitepackages = True
Matthew Treinish7228e112013-10-03 14:58:54 +000060setenv = OS_TEST_TIMEOUT=1200
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]
Sean Daguea646d172014-02-20 18:50:41 -050066sitepackages = True
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]
Sean Daguea646d172014-02-20 18:50:41 -050071sitepackages = True
Monty Taylor8d4c90c2013-05-02 14:33:18 -040072commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000073 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040074
Joe Gordond2796292013-11-14 12:55:55 -080075[testenv:smoke-serial]
Sean Daguea646d172014-02-20 18:50:41 -050076sitepackages = True
Joe Gordond2796292013-11-14 12:55:55 -080077# This is still serial because neutron doesn't work with parallel. See:
78# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
79# job would fail if we moved it to parallel.
80commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000081 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080082
Matthew Treinishcee11772013-07-02 17:50:41 -040083[testenv:stress]
Sean Daguea646d172014-02-20 18:50:41 -050084sitepackages = True
Matthew Treinishcee11772013-07-02 17:50:41 -040085commands =
Matthew Treinish55e29b42014-05-07 01:04:17 -040086 run-tempest-stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -040087
Sean Dagueb56052b2013-05-21 17:57:41 -040088[testenv:venv]
89commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +080090deps = -r{toxinidir}/requirements.txt
91 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -040092
Matthew Treinish8bd013e2014-06-18 21:58:32 -040093[testenv:docs]
94commands = python setup.py build_sphinx {posargs}
95deps = -r{toxinidir}/requirements.txt
96 -r{toxinidir}/test-requirements.txt
97
Jay Pipesa6aa5f22012-07-24 19:40:29 -040098[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +000099commands =
100 flake8 {posargs}
101 {toxinidir}/tools/config/check_uptodate.sh
102
Zhenguo Niud41413a2013-05-29 17:42:42 +0800103deps = -r{toxinidir}/requirements.txt
104 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700105
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