blob: b3d43971f5e028aeb01b8576277407582d92fec6 [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}'
32
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040033[testenv:all]
Sean Daguea646d172014-02-20 18:50:41 -050034sitepackages = True
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040035setenv = VIRTUAL_ENV={envdir}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040036commands =
Attila Fazekas5739ac12014-02-20 07:09:07 +010037 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040038
Monty Taylor8d4c90c2013-05-02 14:33:18 -040039[testenv:full]
Sean Daguea646d172014-02-20 18:50:41 -050040sitepackages = True
Matthew Treinish59eb0b22013-08-07 15:48:21 -040041# The regex below is used to select which tests to run and exclude the slow tag:
42# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040043commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000044 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040045
Matthew Treinish99288cd2014-02-10 09:21:51 -050046[testenv:full-serial]
47# The regex below is used to select which tests to run and exclude the slow tag:
48# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
49commands =
50 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
51
Matthew Treinish87af1bb2013-06-17 15:29:10 -040052[testenv:testr-full]
Sean Daguea646d172014-02-20 18:50:41 -050053sitepackages = True
Matthew Treinish87af1bb2013-06-17 15:29:10 -040054commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000055 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040056
David Kranzc5d52e92013-08-23 11:47:36 -040057[testenv:heat-slow]
Sean Daguea646d172014-02-20 18:50:41 -050058sitepackages = True
Matthew Treinish7228e112013-10-03 14:58:54 +000059setenv = OS_TEST_TIMEOUT=1200
David Kranzc5d52e92013-08-23 11:47:36 -040060# The regex below is used to select heat api/scenario tests tagged as slow.
61commands =
Matthew Treinish20095902014-04-03 14:06:32 -040062 bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040063
Joe Gordon40028152013-08-26 17:53:29 -040064[testenv:large-ops]
Sean Daguea646d172014-02-20 18:50:41 -050065sitepackages = True
Joe Gordon40028152013-08-26 17:53:29 -040066commands =
67 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
68
Monty Taylor8d4c90c2013-05-02 14:33:18 -040069[testenv:smoke]
Sean Daguea646d172014-02-20 18:50:41 -050070sitepackages = True
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]
Sean Daguea646d172014-02-20 18:50:41 -050075sitepackages = True
Joe Gordond2796292013-11-14 12:55:55 -080076# This is still serial because neutron doesn't work with parallel. See:
77# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
78# job would fail if we moved it to parallel.
79commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000080 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080081
Matthew Treinishcee11772013-07-02 17:50:41 -040082[testenv:stress]
Sean Daguea646d172014-02-20 18:50:41 -050083sitepackages = True
Matthew Treinishcee11772013-07-02 17:50:41 -040084commands =
Matthew Treinish55e29b42014-05-07 01:04:17 -040085 run-tempest-stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -040086
Sean Dagueb56052b2013-05-21 17:57:41 -040087[testenv:venv]
88commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +080089deps = -r{toxinidir}/requirements.txt
90 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -040091
Matthew Treinish8bd013e2014-06-18 21:58:32 -040092[testenv:docs]
93commands = python setup.py build_sphinx {posargs}
94deps = -r{toxinidir}/requirements.txt
95 -r{toxinidir}/test-requirements.txt
96
Jay Pipesa6aa5f22012-07-24 19:40:29 -040097[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +000098commands =
99 flake8 {posargs}
100 {toxinidir}/tools/config/check_uptodate.sh
101
Zhenguo Niud41413a2013-05-29 17:42:42 +0800102deps = -r{toxinidir}/requirements.txt
103 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700104
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400105[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400106local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400107import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400108
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700109[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700110# 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 -0400111# H402 skipped because some docstrings aren't sentences
Matthew Treinish96e9e882014-06-09 18:37:19 -0400112# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400113# E129 skipped because it is too limiting when combined with other rules
114# Skipped because of new hacking 0.9: H405,H904
115ignore = E125,H402,E123,E129,H404,H405,H904
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700116show-source = True
117exclude = .git,.venv,.tox,dist,doc,openstack,*egg