blob: 96a97f4fe5e65c90e5844701571f1c545afe978d [file] [log] [blame]
Jay Pipesa6aa5f22012-07-24 19:40:29 -04001[tox]
lvdongbing768c8072015-12-01 22:38:57 -05002envlist = pep8,py34,py27
Ghanshyam3a59e1e2016-01-14 17:15:29 +09003minversion = 2.3.1
Matthew Treinish7228e112013-10-03 14:58:54 +00004skipsdist = True
Jay Pipesa6aa5f22012-07-24 19:40:29 -04005
Matthew Treinish5b7626a2014-09-23 17:39:38 -04006[tempestenv]
Joe Gordon9f1612e2015-01-28 11:23:43 -08007sitepackages = False
Jay Pipesa6aa5f22012-07-24 19:40:29 -04008setenv = VIRTUAL_ENV={envdir}
Matthew Treinish87f772c2013-12-16 20:07:42 +00009 OS_TEST_PATH=./tempest/test_discover
Jeremy Stanley0ae5d522014-12-29 19:21:42 +000010deps = setuptools
11 -r{toxinidir}/requirements.txt
Matthew Treinish5b7626a2014-09-23 17:39:38 -040012
13[testenv]
14setenv = VIRTUAL_ENV={envdir}
15 OS_TEST_PATH=./tempest/tests
yan.haifeng658544f2015-06-12 14:41:41 +080016passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH OS_TEST_PATH TEMPEST_CONFIG TEMPEST_CONFIG_DIR http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
Matthew Treinish7228e112013-10-03 14:58:54 +000017usedevelop = True
Sean Daguea646d172014-02-20 18:50:41 -050018install_command = pip install -U {opts} {packages}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040019whitelist_externals = *
20deps = -r{toxinidir}/requirements.txt
21 -r{toxinidir}/test-requirements.txt
Sean Daguec7b4d882014-11-25 08:18:23 -050022commands =
23 find . -type f -name "*.pyc" -delete
24 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish12fdf4b2013-10-03 15:20:09 +000025
Jon Grimm270bd7f2014-08-05 18:11:29 +000026[testenv:genconfig]
David Paterson0bf52d42015-04-13 21:55:58 -040027commands = oslo-config-generator --config-file etc/config-generator.tempest.conf
Jon Grimm270bd7f2014-08-05 18:11:29 +000028
Matthew Treinishb2f5cad2014-01-07 21:54:55 +000029[testenv:cover]
30setenv = OS_TEST_PATH=./tempest/tests
31commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'
32
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040033[testenv:all]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040034sitepackages = {[tempestenv]sitepackages}
David Kranzf9695d22014-10-27 11:43:52 -040035# 'all' includes slow tests
Matthew Treinish5b7626a2014-09-23 17:39:38 -040036setenv = {[tempestenv]setenv}
Sergey Reshetnyake05246d2015-11-30 14:09:11 +030037 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Matthew Treinish5b7626a2014-09-23 17:39:38 -040038deps = {[tempestenv]deps}
Giampaolo Lauria7a3e0042013-06-07 14:59:19 -040039commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050040 find . -type f -name "*.pyc" -delete
Attila Fazekas5739ac12014-02-20 07:09:07 +010041 bash tools/pretty_tox.sh '{posargs}'
Matthew Treinish87af1bb2013-06-17 15:29:10 -040042
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020043[testenv:all-plugin]
44sitepackages = True
45# 'all' includes slow tests
46setenv = {[tempestenv]setenv}
Sergey Reshetnyake05246d2015-11-30 14:09:11 +030047 OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200}
Marc Kodererc2f9b3a2015-07-27 15:19:08 +020048deps = {[tempestenv]deps}
49commands =
50 find . -type f -name "*.pyc" -delete
51 bash tools/pretty_tox.sh '{posargs}'
52
Monty Taylor8d4c90c2013-05-02 14:33:18 -040053[testenv:full]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040054sitepackages = {[tempestenv]sitepackages}
55setenv = {[tempestenv]setenv}
56deps = {[tempestenv]deps}
Matthew Treinish59eb0b22013-08-07 15:48:21 -040057# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +090058# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish83d2ec42013-07-30 16:37:32 -040059commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050060 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040061 bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish83d2ec42013-07-30 16:37:32 -040062
Matthew Treinish99288cd2014-02-10 09:21:51 -050063[testenv:full-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040064sitepackages = {[tempestenv]sitepackages}
65setenv = {[tempestenv]setenv}
66deps = {[tempestenv]deps}
Matthew Treinish99288cd2014-02-10 09:21:51 -050067# The regex below is used to select which tests to run and exclude the slow tag:
Masayuki Igawa83522042015-12-01 16:51:34 +090068# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
Matthew Treinish99288cd2014-02-10 09:21:51 -050069commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050070 find . -type f -name "*.pyc" -delete
Matthew Treinish464d2872015-04-29 12:23:01 -040071 bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}'
Matthew Treinish99288cd2014-02-10 09:21:51 -050072
Joe Gordon40028152013-08-26 17:53:29 -040073[testenv:large-ops]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040074sitepackages = {[tempestenv]sitepackages}
75setenv = {[tempestenv]setenv}
76deps = {[tempestenv]deps}
Joe Gordon40028152013-08-26 17:53:29 -040077commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050078 find . -type f -name "*.pyc" -delete
Joe Gordon40028152013-08-26 17:53:29 -040079 python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
80
Monty Taylor8d4c90c2013-05-02 14:33:18 -040081[testenv:smoke]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040082sitepackages = {[tempestenv]sitepackages}
83setenv = {[tempestenv]setenv}
84deps = {[tempestenv]deps}
Monty Taylor8d4c90c2013-05-02 14:33:18 -040085commands =
Sean Daguec7b4d882014-11-25 08:18:23 -050086 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040087 bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}'
Monty Taylor8d4c90c2013-05-02 14:33:18 -040088
Joe Gordond2796292013-11-14 12:55:55 -080089[testenv:smoke-serial]
Matthew Treinish5b7626a2014-09-23 17:39:38 -040090sitepackages = {[tempestenv]sitepackages}
91setenv = {[tempestenv]setenv}
92deps = {[tempestenv]deps}
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 =
Sean Daguec7b4d882014-11-25 08:18:23 -050097 find . -type f -name "*.pyc" -delete
Sean Dague3c634d12015-04-27 12:09:19 -040098 bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}'
Joe Gordond2796292013-11-14 12:55:55 -080099
Matthew Treinishcee11772013-07-02 17:50:41 -0400100[testenv:stress]
Matthew Treinish5b7626a2014-09-23 17:39:38 -0400101sitepackages = {[tempestenv]sitepackages}
102setenv = {[tempestenv]setenv}
103deps = {[tempestenv]deps}
Matthew Treinishcee11772013-07-02 17:50:41 -0400104commands =
David Kranz03fbe5c2014-11-11 15:29:00 -0500105 run-tempest-stress {posargs}
Matthew Treinishcee11772013-07-02 17:50:41 -0400106
Sean Dagueb56052b2013-05-21 17:57:41 -0400107[testenv:venv]
108commands = {posargs}
Sean Dagueb56052b2013-05-21 17:57:41 -0400109
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400110[testenv:docs]
Mathew Oddenb389faa2015-07-30 20:24:08 +0000111commands =
Mathew Oddenb389faa2015-07-30 20:24:08 +0000112 python setup.py build_sphinx {posargs}
Matthew Treinish8bd013e2014-06-18 21:58:32 -0400113
Jay Pipesa6aa5f22012-07-24 19:40:29 -0400114[testenv:pep8]
Matthew Treinish3d468112013-10-24 21:49:14 +0000115commands =
116 flake8 {posargs}
Matthew Treinishc1802bc2015-12-03 18:48:11 -0500117 check-uuid
Matthew Treinish3d468112013-10-24 21:49:14 +0000118
Chris Hoge7579c1a2015-02-26 14:12:15 -0800119[testenv:uuidgen]
120commands =
Matthew Treinishc1802bc2015-12-03 18:48:11 -0500121 check-uuid --fix
Chris Hoge296558c2015-02-19 00:29:49 -0600122
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400123[hacking]
Giampaolo Lauriad50c27d2013-05-23 15:23:12 -0400124local-check-factory = tempest.hacking.checks.factory
Matthew Treinish2b6db0c2014-05-17 10:42:36 -0400125import_exceptions = tempest.services
Giampaolo Lauria1b837ce2013-05-01 11:22:07 -0400126
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700127[flake8]
Joe Gordondca03dd2013-07-18 14:10:19 -0700128# 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 Treinish96e9e882014-06-09 18:37:19 -0400129# E123 skipped because it is ignored by default in the default pep8
Matthew Treinish1d14c542014-06-17 20:25:40 -0400130# E129 skipped because it is too limiting when combined with other rules
Joe Gordon28788b42015-02-25 12:42:37 -0800131# Skipped because of new hacking 0.9: H405
Ken'ichi Ohmichi2e2ee192015-11-19 09:48:27 +0000132ignore = E125,E123,E129
Monty Taylorb2ca5ca2013-04-28 18:00:21 -0700133show-source = True
134exclude = .git,.venv,.tox,dist,doc,openstack,*egg
Andrea Frittoli (andreaf)897ecfb2016-02-23 10:12:48 -0500135
136[testenv:releasenotes]
137commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html