blob: d93112cf29fb55d1c63d614ccac1962077912ee7 [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 Treinish87af1bb2013-06-17 15:29:10 -04008 LANG=en_US.UTF-8
9 LANGUAGE=en_US:en
10 LC_ALL=C
Matthew Treinish7228e112013-10-03 14:58:54 +000011usedevelop = True
Monty Taylor8d4c90c2013-05-02 14:33:18 -040012
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000013[testenv:py26]
14commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
15
16[testenv:py33]
17commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
18
19[testenv:py27]
20commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
21
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040022[testenv:all]
23sitepackages = True
24setenv = VIRTUAL_ENV={envdir}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040025commands =
Matthew Treinisheda037c2013-08-09 16:57:28 -040026 python setup.py testr --slowest --testr-args='{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040027
Monty Taylor8d4c90c2013-05-02 14:33:18 -040028[testenv:full]
29sitepackages = True
Matthew Treinish59eb0b22013-08-07 15:48:21 -040030# The regex below is used to select which tests to run and exclude the slow tag:
31# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040032commands =
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000033 sh tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040034
Matthew Treinish87af1bb2013-06-17 15:29:10 -040035[testenv:testr-full]
36sitepackages = True
Matthew Treinish87af1bb2013-06-17 15:29:10 -040037commands =
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000038 sh tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040039
David Kranzc5d52e92013-08-23 11:47:36 -040040[testenv:heat-slow]
41sitepackages = True
Matthew Treinish7228e112013-10-03 14:58:54 +000042setenv = OS_TEST_TIMEOUT=1200
David Kranzc5d52e92013-08-23 11:47:36 -040043# The regex below is used to select heat api/scenario tests tagged as slow.
44commands =
45 sh tools/pretty_tox_serial.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
46
Joe Gordon40028152013-08-26 17:53:29 -040047[testenv:large-ops]
48sitepackages = True
Joe Gordon40028152013-08-26 17:53:29 -040049commands =
50 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
51
52
Matthew Treinishf0e47472013-08-15 16:54:45 -040053[testenv:py26-full]
54sitepackages = True
55setenv = VIRTUAL_ENV={envdir}
56 NOSE_WITH_OPENSTACK=1
57 NOSE_OPENSTACK_COLOR=1
58 NOSE_OPENSTACK_RED=15
59 NOSE_OPENSTACK_YELLOW=3
60 NOSE_OPENSTACK_SHOW_ELAPSED=1
61 NOSE_OPENSTACK_STDOUT=1
Attila Fazekasea88d9f2013-10-03 12:51:44 +020062 TEMPEST_PY26_NOSE_COMPAT=1
Matthew Treinishf0e47472013-08-15 16:54:45 -040063commands =
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000064 nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit -sv --xunit-file=nosetests-full.xml tempest/api tempest/scenario tempest/thirdparty tempest/cli {posargs}
Matthew Treinishf0e47472013-08-15 16:54:45 -040065
66[testenv:py26-smoke]
67setenv = VIRTUAL_ENV={envdir}
68NOSE_WITH_OPENSTACK=1
69 NOSE_OPENSTACK_COLOR=1
70 NOSE_OPENSTACK_RED=15
71 NOSE_OPENSTACK_YELLOW=3
72 NOSE_OPENSTACK_SHOW_ELAPSED=1
73 NOSE_OPENSTACK_STDOUT=1
Attila Fazekasea88d9f2013-10-03 12:51:44 +020074 TEMPEST_PY26_NOSE_COMPAT=1
Matthew Treinishf0e47472013-08-15 16:54:45 -040075commands =
76 nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit -sv --attr=type=smoke --xunit-file=nosetests-smoke.xml tempest {posargs}
77
Monty Taylor8d4c90c2013-05-02 14:33:18 -040078[testenv:smoke]
79sitepackages = True
Matthew Treinish26058bc2013-08-13 17:50:59 -040080# This is still serial because neutron doesn't work with parallel. See:
81# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
82# job would fail if we moved it to parallel.
Monty Taylor8d4c90c2013-05-02 14:33:18 -040083commands =
Matthew Treinish59eb0b22013-08-07 15:48:21 -040084 sh tools/pretty_tox_serial.sh 'smoke {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040085
Matthew Treinishd15705b2012-10-16 14:04:48 -040086[testenv:coverage]
Monty Taylor8d4c90c2013-05-02 14:33:18 -040087sitepackages = True
Monty Taylor8d4c90c2013-05-02 14:33:18 -040088commands =
89 python -m tools/tempest_coverage -c start --combine
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000090 sh tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli))'
Matthew Treinish04001292013-06-19 16:39:50 -040091 python -m tools/tempest_coverage -c report --html {posargs}
Matthew Treinishd15705b2012-10-16 14:04:48 -040092
Matthew Treinishcee11772013-07-02 17:50:41 -040093[testenv:stress]
94sitepackages = True
Matthew Treinishcee11772013-07-02 17:50:41 -040095commands =
Marc Koderer8f940ab2013-09-25 17:31:50 +020096 python -m tempest/stress/run_stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -040097
Sean Dagueb56052b2013-05-21 17:57:41 -040098[testenv:venv]
99commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +0800100deps = -r{toxinidir}/requirements.txt
101 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400102
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400103[testenv:pep8]
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700104commands = flake8
Zhenguo Niud41413a2013-05-29 17:42:42 +0800105deps = -r{toxinidir}/requirements.txt
106 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700107
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400108[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400109local-check-factory = tempest.hacking.checks.factory
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400110
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700111[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700112# 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/
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700113ignore = E125,H302,H404
114show-source = True
115exclude = .git,.venv,.tox,dist,doc,openstack,*egg