blob: cab59a83a5c3b7a1de6684c0f10ec6ef5df750dd [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 Treinish7228e112013-10-03 14:58:54 +00009usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050010install_command = pip install -U {opts} {packages}
Joe Gordonfdd06632014-09-24 17:35:02 -070011whitelist_externals = bash
12
Monty Taylor8d4c90c2013-05-02 14:33:18 -040013
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000014[testenv:py26]
Matthew Treinishbf470612013-12-13 15:46:44 +000015setenv = OS_TEST_PATH=./tempest/tests
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 Treinish12fdf4b2013-10-03 15:20:09 +000020commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
21
Jeremy Stanleydd2e07a2014-09-03 19:40:14 +000022[testenv:py34]
23setenv = OS_TEST_PATH=./tempest/tests
24 PYTHONHASHSEED=0
25commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
26
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000027[testenv:py27]
Matthew Treinishbf470612013-12-13 15:46:44 +000028setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000029commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
30
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000031[testenv:cover]
32setenv = OS_TEST_PATH=./tempest/tests
33commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
Matthew Treinish3a481812014-08-26 19:08:43 -040034deps = -r{toxinidir}/requirements.txt
35 -r{toxinidir}/test-requirements.txt
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000036
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040037[testenv:all]
Sean Daguea646d172014-02-20 18:50:41 -050038sitepackages = True
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040039commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010040 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040041
Monty Taylor8d4c90c2013-05-02 14:33:18 -040042[testenv:full]
Sean Daguea646d172014-02-20 18:50:41 -050043sitepackages = True
Matthew Treinish59eb0b22013-08-07 15:48:21 -040044# The regex below is used to select which tests to run and exclude the slow tag:
45# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040046commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000047 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040048
Matthew Treinish99288cd2014-02-10 09:21:51 -050049[testenv:full-serial]
50# The regex below is used to select which tests to run and exclude the slow tag:
51# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
52commands =
53 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
54
Matthew Treinish87af1bb2013-06-17 15:29:10 -040055[testenv:testr-full]
Sean Daguea646d172014-02-20 18:50:41 -050056sitepackages = True
Matthew Treinish87af1bb2013-06-17 15:29:10 -040057commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000058 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040059
David Kranzc5d52e92013-08-23 11:47:36 -040060[testenv:heat-slow]
Sean Daguea646d172014-02-20 18:50:41 -050061sitepackages = True
Matthew Treinish7228e112013-10-03 14:58:54 +000062setenv = OS_TEST_TIMEOUT=1200
David Kranzc5d52e92013-08-23 11:47:36 -040063# The regex below is used to select heat api/scenario tests tagged as slow.
64commands =
Matthew Treinish20095902014-04-03 14:06:32 -040065 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040066
Joe Gordon40028152013-08-26 17:53:29 -040067[testenv:large-ops]
Sean Daguea646d172014-02-20 18:50:41 -050068sitepackages = True
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]
Sean Daguea646d172014-02-20 18:50:41 -050073sitepackages = True
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]
Sean Daguea646d172014-02-20 18:50:41 -050078sitepackages = True
Joe Gordond2796292013-11-14 12:55:55 -080079# This is still serial because neutron doesn't work with parallel. See:
80# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
81# job would fail if we moved it to parallel.
82commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000083 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080084
Matthew Treinishcee11772013-07-02 17:50:41 -040085[testenv:stress]
Sean Daguea646d172014-02-20 18:50:41 -050086sitepackages = True
Matthew Treinishcee11772013-07-02 17:50:41 -040087commands =
Matthew Treinish55e29b42014-05-07 01:04:17 -040088 run-tempest-stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -040089
Sean Dagueb56052b2013-05-21 17:57:41 -040090[testenv:venv]
91commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +080092deps = -r{toxinidir}/requirements.txt
93 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -040094
Matthew Treinish8bd013e2014-06-18 21:58:32 -040095[testenv:docs]
96commands = python setup.py build_sphinx {posargs}
97deps = -r{toxinidir}/requirements.txt
98 -r{toxinidir}/test-requirements.txt
99
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
Zhenguo Niud41413a2013-05-29 17:42:42 +0800106deps = -r{toxinidir}/requirements.txt
107 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700108
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400109[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400110local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400111import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400112
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700113[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700114# 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 -0400115# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400116# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400117# E129 skipped because it is too limiting when combined with other rules
Matthew Treinish75d540d2014-08-15 14:19:03 -0400118# H305 skipped because it is inconsistent between python versions
Matthew Treinish1d14c542014-06-17 20:25:40 -0400119# Skipped because of new hacking 0.9: H405,H904
Matthew Treinish75d540d2014-08-15 14:19:03 -0400120ignore = E125,H402,E123,E129,H404,H405,H904,H305
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700121show-source = True
122exclude = .git,.venv,.tox,dist,doc,openstack,*egg