blob: b44b3e0d41cbd4661ee80647cac4443b75c22b57 [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 Treinish87f772c2013-12-16 20:07:42 +000011 OS_TEST_PATH=./tempest/test_discover
Matthew Treinish7228e112013-10-03 14:58:54 +000012usedevelop = True
James E. Blair02225942013-12-11 09:33:51 -080013install_command = pip install -U {opts} {packages}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040014
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000015[testenv:py26]
Matthew Treinishbf470612013-12-13 15:46:44 +000016setenv = OS_TEST_PATH=./tempest/tests
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000017commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
18
19[testenv:py33]
Matthew Treinishbf470612013-12-13 15:46:44 +000020setenv = OS_TEST_PATH=./tempest/tests
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 Treinish12fdf4b2013-10-03 15:20:09 +000025commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
26
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040027[testenv:all]
28sitepackages = True
29setenv = VIRTUAL_ENV={envdir}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040030commands =
Matthew Treinisheda037c2013-08-09 16:57:28 -040031 python setup.py testr --slowest --testr-args='{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040032
Monty Taylor8d4c90c2013-05-02 14:33:18 -040033[testenv:full]
34sitepackages = True
Matthew Treinish59eb0b22013-08-07 15:48:21 -040035# The regex below is used to select which tests to run and exclude the slow tag:
36# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040037commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000038 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040039
Matthew Treinish87af1bb2013-06-17 15:29:10 -040040[testenv:testr-full]
41sitepackages = True
Matthew Treinish87af1bb2013-06-17 15:29:10 -040042commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000043 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040044
David Kranzc5d52e92013-08-23 11:47:36 -040045[testenv:heat-slow]
46sitepackages = True
Matthew Treinish7228e112013-10-03 14:58:54 +000047setenv = OS_TEST_TIMEOUT=1200
David Kranzc5d52e92013-08-23 11:47:36 -040048# The regex below is used to select heat api/scenario tests tagged as slow.
49commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000050 bash tools/pretty_tox_serial.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
David Kranzc5d52e92013-08-23 11:47:36 -040051
Joe Gordon40028152013-08-26 17:53:29 -040052[testenv:large-ops]
53sitepackages = True
Joe Gordon40028152013-08-26 17:53:29 -040054commands =
55 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
56
57
Matthew Treinishf0e47472013-08-15 16:54:45 -040058[testenv:py26-full]
59sitepackages = True
60setenv = VIRTUAL_ENV={envdir}
61 NOSE_WITH_OPENSTACK=1
62 NOSE_OPENSTACK_COLOR=1
63 NOSE_OPENSTACK_RED=15
64 NOSE_OPENSTACK_YELLOW=3
65 NOSE_OPENSTACK_SHOW_ELAPSED=1
66 NOSE_OPENSTACK_STDOUT=1
Attila Fazekasea88d9f2013-10-03 12:51:44 +020067 TEMPEST_PY26_NOSE_COMPAT=1
Matthew Treinishf0e47472013-08-15 16:54:45 -040068commands =
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000069 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 -040070
71[testenv:py26-smoke]
72setenv = VIRTUAL_ENV={envdir}
73NOSE_WITH_OPENSTACK=1
74 NOSE_OPENSTACK_COLOR=1
75 NOSE_OPENSTACK_RED=15
76 NOSE_OPENSTACK_YELLOW=3
77 NOSE_OPENSTACK_SHOW_ELAPSED=1
78 NOSE_OPENSTACK_STDOUT=1
Attila Fazekasea88d9f2013-10-03 12:51:44 +020079 TEMPEST_PY26_NOSE_COMPAT=1
Matthew Treinishf0e47472013-08-15 16:54:45 -040080commands =
81 nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit -sv --attr=type=smoke --xunit-file=nosetests-smoke.xml tempest {posargs}
82
Monty Taylor8d4c90c2013-05-02 14:33:18 -040083[testenv:smoke]
84sitepackages = True
Monty Taylor8d4c90c2013-05-02 14:33:18 -040085commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000086 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040087
Joe Gordond2796292013-11-14 12:55:55 -080088[testenv:smoke-serial]
89sitepackages = True
90# This is still serial because neutron doesn't work with parallel. See:
91# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
92# job would fail if we moved it to parallel.
93commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000094 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080095
Matthew Treinishcee11772013-07-02 17:50:41 -040096[testenv:stress]
97sitepackages = True
Matthew Treinishcee11772013-07-02 17:50:41 -040098commands =
Marc Koderer8f940ab2013-09-25 17:31:50 +020099 python -m tempest/stress/run_stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -0400100
Sean Dagueb56052b2013-05-21 17:57:41 -0400101[testenv:venv]
102commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +0800103deps = -r{toxinidir}/requirements.txt
104 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400105
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400106[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000107setenv = MODULEPATH=tempest.common.generate_sample_tempest
108commands =
109 flake8 {posargs}
110 {toxinidir}/tools/config/check_uptodate.sh
111
Zhenguo Niud41413a2013-05-29 17:42:42 +0800112deps = -r{toxinidir}/requirements.txt
113 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700114
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400115[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400116local-check-factory = tempest.hacking.checks.factory
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400117
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700118[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700119# 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 -0700120ignore = E125,H302,H404
121show-source = True
122exclude = .git,.venv,.tox,dist,doc,openstack,*egg