blob: dd36e60f5d866ccaeda1b4709048f8c150e3c71c [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
2envlist = pep8
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}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040011
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000012[testenv:py26]
Matthew Treinishbf470612013-12-13 15:46:44 +000013setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000014commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
15
16[testenv:py33]
Matthew Treinishbf470612013-12-13 15:46:44 +000017setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000018commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
19
20[testenv:py27]
Matthew Treinishbf470612013-12-13 15:46:44 +000021setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000022commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
23
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000024[testenv:cover]
25setenv = OS_TEST_PATH=./tempest/tests
26commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
27
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040028[testenv:all]
Sean Daguea646d172014-02-20 18:50:41 -050029sitepackages = True
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040030setenv = VIRTUAL_ENV={envdir}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040031commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010032 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040033
Monty Taylor8d4c90c2013-05-02 14:33:18 -040034[testenv:full]
Sean Daguea646d172014-02-20 18:50:41 -050035sitepackages = True
Matthew Treinish59eb0b22013-08-07 15:48:21 -040036# The regex below is used to select which tests to run and exclude the slow tag:
37# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040038commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000039 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040040
Matthew Treinish99288cd2014-02-10 09:21:51 -050041[testenv:full-serial]
42# 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
44commands =
45 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
46
Matthew Treinish87af1bb2013-06-17 15:29:10 -040047[testenv:testr-full]
Sean Daguea646d172014-02-20 18:50:41 -050048sitepackages = True
Matthew Treinish87af1bb2013-06-17 15:29:10 -040049commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000050 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040051
David Kranzc5d52e92013-08-23 11:47:36 -040052[testenv:heat-slow]
Sean Daguea646d172014-02-20 18:50:41 -050053sitepackages = True
Matthew Treinish7228e112013-10-03 14:58:54 +000054setenv = OS_TEST_TIMEOUT=1200
David Kranzc5d52e92013-08-23 11:47:36 -040055# The regex below is used to select heat api/scenario tests tagged as slow.
56commands =
Matthew Treinish20095902014-04-03 14:06:32 -040057 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040058
Joe Gordon40028152013-08-26 17:53:29 -040059[testenv:large-ops]
Sean Daguea646d172014-02-20 18:50:41 -050060sitepackages = True
Joe Gordon40028152013-08-26 17:53:29 -040061commands =
62 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
63
Monty Taylor8d4c90c2013-05-02 14:33:18 -040064[testenv:smoke]
Sean Daguea646d172014-02-20 18:50:41 -050065sitepackages = True
Monty Taylor8d4c90c2013-05-02 14:33:18 -040066commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000067 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040068
Joe Gordond2796292013-11-14 12:55:55 -080069[testenv:smoke-serial]
Sean Daguea646d172014-02-20 18:50:41 -050070sitepackages = True
Joe Gordond2796292013-11-14 12:55:55 -080071# This is still serial because neutron doesn't work with parallel. See:
72# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
73# job would fail if we moved it to parallel.
74commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000075 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080076
Matthew Treinishcee11772013-07-02 17:50:41 -040077[testenv:stress]
Sean Daguea646d172014-02-20 18:50:41 -050078sitepackages = True
Matthew Treinishcee11772013-07-02 17:50:41 -040079commands =
Matthew Treinish55e29b42014-05-07 01:04:17 -040080 run-tempest-stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -040081
Sean Dagueb56052b2013-05-21 17:57:41 -040082[testenv:venv]
83commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +080084deps = -r{toxinidir}/requirements.txt
85 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -040086
Matthew Treinish8bd013e2014-06-18 21:58:32 -040087[testenv:docs]
88commands = python setup.py build_sphinx {posargs}
89deps = -r{toxinidir}/requirements.txt
90 -r{toxinidir}/test-requirements.txt
91
Jay Pipesa6aa5f22012-07-24 19:40:29 -040092[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +000093setenv = MODULEPATH=tempest.common.generate_sample_tempest
94commands =
95 flake8 {posargs}
96 {toxinidir}/tools/config/check_uptodate.sh
97
Zhenguo Niud41413a2013-05-29 17:42:42 +080098deps = -r{toxinidir}/requirements.txt
99 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700100
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400101[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400102local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400103import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400104
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700105[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700106# 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 -0400107# H402 skipped because some docstrings aren't sentences
108# Skipped because of new hacking 0.9: H407,H405,H904,H305,E123,H307,E122,E129,E128
109ignore = E125,H402,H404,H407,H405,H904,H305,E123,H307,E122,E129,E128
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700110show-source = True
111exclude = .git,.venv,.tox,dist,doc,openstack,*egg