blob: 290069e7944b050635f7196d5f7ac353d976b98c [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]
Sean Daguec81568f2014-01-04 23:25:42 -05007sitepackages = True
Jay Pipesa6aa5f22012-07-24 19:40:29 -04008setenv = VIRTUAL_ENV={envdir}
Matthew Treinish87af1bb2013-06-17 15:29:10 -04009 LANG=en_US.UTF-8
10 LANGUAGE=en_US:en
11 LC_ALL=C
Matthew Treinish87f772c2013-12-16 20:07:42 +000012 OS_TEST_PATH=./tempest/test_discover
Matthew Treinish7228e112013-10-03 14:58:54 +000013usedevelop = True
Sean Daguec81568f2014-01-04 23:25:42 -050014install_command = pip install {opts} {packages}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040015
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000016[testenv:py26]
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:py33]
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
24[testenv:py27]
Matthew Treinishbf470612013-12-13 15:46:44 +000025setenv = OS_TEST_PATH=./tempest/tests
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
30commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
31
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040032[testenv:all]
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040033setenv = VIRTUAL_ENV={envdir}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040034commands =
Matthew Treinisheda037c2013-08-09 16:57:28 -040035 python setup.py testr --slowest --testr-args='{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040036
Monty Taylor8d4c90c2013-05-02 14:33:18 -040037[testenv:full]
Matthew Treinish59eb0b22013-08-07 15:48:21 -040038# The regex below is used to select which tests to run and exclude the slow tag:
39# See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040040commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000041 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040042
Matthew Treinish99288cd2014-02-10 09:21:51 -050043[testenv:full-serial]
44# 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
46commands =
47 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
48
Matthew Treinish87af1bb2013-06-17 15:29:10 -040049[testenv:testr-full]
Matthew Treinish87af1bb2013-06-17 15:29:10 -040050commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000051 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040052
David Kranzc5d52e92013-08-23 11:47:36 -040053[testenv:heat-slow]
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 Treinish1ee43982013-12-06 21:08:31 +000057 bash tools/pretty_tox_serial.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]
Joe Gordon40028152013-08-26 17:53:29 -040060commands =
61 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
62
63
Matthew Treinishf0e47472013-08-15 16:54:45 -040064[testenv:py26-full]
Matthew Treinishf0e47472013-08-15 16:54:45 -040065setenv = VIRTUAL_ENV={envdir}
66 NOSE_WITH_OPENSTACK=1
67 NOSE_OPENSTACK_COLOR=1
68 NOSE_OPENSTACK_RED=15
69 NOSE_OPENSTACK_YELLOW=3
70 NOSE_OPENSTACK_SHOW_ELAPSED=1
71 NOSE_OPENSTACK_STDOUT=1
Attila Fazekasea88d9f2013-10-03 12:51:44 +020072 TEMPEST_PY26_NOSE_COMPAT=1
Matthew Treinishf0e47472013-08-15 16:54:45 -040073commands =
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000074 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 -040075
76[testenv:py26-smoke]
77setenv = VIRTUAL_ENV={envdir}
78NOSE_WITH_OPENSTACK=1
79 NOSE_OPENSTACK_COLOR=1
80 NOSE_OPENSTACK_RED=15
81 NOSE_OPENSTACK_YELLOW=3
82 NOSE_OPENSTACK_SHOW_ELAPSED=1
83 NOSE_OPENSTACK_STDOUT=1
Attila Fazekasea88d9f2013-10-03 12:51:44 +020084 TEMPEST_PY26_NOSE_COMPAT=1
Matthew Treinishf0e47472013-08-15 16:54:45 -040085commands =
86 nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit -sv --attr=type=smoke --xunit-file=nosetests-smoke.xml tempest {posargs}
87
Monty Taylor8d4c90c2013-05-02 14:33:18 -040088[testenv:smoke]
Monty Taylor8d4c90c2013-05-02 14:33:18 -040089commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000090 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040091
Joe Gordond2796292013-11-14 12:55:55 -080092[testenv:smoke-serial]
Joe Gordond2796292013-11-14 12:55:55 -080093# This is still serial because neutron doesn't work with parallel. See:
94# https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
95# job would fail if we moved it to parallel.
96commands =
Matthew Treinish1ee43982013-12-06 21:08:31 +000097 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080098
Matthew Treinishcee11772013-07-02 17:50:41 -040099[testenv:stress]
Matthew Treinishcee11772013-07-02 17:50:41 -0400100commands =
Marc Koderer8f940ab2013-09-25 17:31:50 +0200101 python -m tempest/stress/run_stress -a -d 3600 -S
Matthew Treinishcee11772013-07-02 17:50:41 -0400102
Sean Dagueb56052b2013-05-21 17:57:41 -0400103[testenv:venv]
104commands = {posargs}
Zhenguo Niud41413a2013-05-29 17:42:42 +0800105deps = -r{toxinidir}/requirements.txt
106 -r{toxinidir}/test-requirements.txt
Sean Dagueb56052b2013-05-21 17:57:41 -0400107
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400108[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000109setenv = MODULEPATH=tempest.common.generate_sample_tempest
110commands =
111 flake8 {posargs}
112 {toxinidir}/tools/config/check_uptodate.sh
113
Zhenguo Niud41413a2013-05-29 17:42:42 +0800114deps = -r{toxinidir}/requirements.txt
115 -r{toxinidir}/test-requirements.txt
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700116
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400117[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400118local-check-factory = tempest.hacking.checks.factory
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400119
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700120[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700121# 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 -0700122ignore = E125,H302,H404
123show-source = True
124exclude = .git,.venv,.tox,dist,doc,openstack,*egg