Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 1 | [tox] |
lvdongbing | 768c807 | 2015-12-01 22:38:57 -0500 | [diff] [blame] | 2 | envlist = pep8,py34,py27 |
Ghanshyam | 3a59e1e | 2016-01-14 17:15:29 +0900 | [diff] [blame] | 3 | minversion = 2.3.1 |
Matthew Treinish | 7228e11 | 2013-10-03 14:58:54 +0000 | [diff] [blame] | 4 | skipsdist = True |
Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 5 | |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 6 | [tempestenv] |
Joe Gordon | 9f1612e | 2015-01-28 11:23:43 -0800 | [diff] [blame] | 7 | sitepackages = False |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 8 | setenv = |
| 9 | VIRTUAL_ENV={envdir} |
| 10 | OS_TEST_PATH=./tempest/test_discover |
| 11 | deps = |
| 12 | setuptools |
| 13 | -r{toxinidir}/requirements.txt |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 14 | |
| 15 | [testenv] |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 16 | setenv = |
| 17 | VIRTUAL_ENV={envdir} |
| 18 | OS_TEST_PATH=./tempest/tests |
yan.haifeng | 658544f | 2015-06-12 14:41:41 +0800 | [diff] [blame] | 19 | passenv = 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 Treinish | 7228e11 | 2013-10-03 14:58:54 +0000 | [diff] [blame] | 20 | usedevelop = True |
Sean Dague | a646d17 | 2014-02-20 18:50:41 -0500 | [diff] [blame] | 21 | install_command = pip install -U {opts} {packages} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 22 | whitelist_externals = * |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 23 | deps = |
| 24 | -r{toxinidir}/requirements.txt |
| 25 | -r{toxinidir}/test-requirements.txt |
Sean Dague | c7b4d88 | 2014-11-25 08:18:23 -0500 | [diff] [blame] | 26 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 27 | find . -type f -name "*.pyc" -delete |
| 28 | bash tools/pretty_tox.sh '{posargs}' |
Matthew Treinish | 12fdf4b | 2013-10-03 15:20:09 +0000 | [diff] [blame] | 29 | |
Jon Grimm | 270bd7f | 2014-08-05 18:11:29 +0000 | [diff] [blame] | 30 | [testenv:genconfig] |
David Paterson | 0bf52d4 | 2015-04-13 21:55:58 -0400 | [diff] [blame] | 31 | commands = oslo-config-generator --config-file etc/config-generator.tempest.conf |
Jon Grimm | 270bd7f | 2014-08-05 18:11:29 +0000 | [diff] [blame] | 32 | |
Matthew Treinish | b2f5cad | 2014-01-07 21:54:55 +0000 | [diff] [blame] | 33 | [testenv:cover] |
| 34 | setenv = OS_TEST_PATH=./tempest/tests |
| 35 | commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}' |
| 36 | |
Giampaolo Lauria | 7a3e004 | 2013-06-07 14:59:19 -0400 | [diff] [blame] | 37 | [testenv:all] |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 38 | sitepackages = {[tempestenv]sitepackages} |
David Kranz | f9695d2 | 2014-10-27 11:43:52 -0400 | [diff] [blame] | 39 | # 'all' includes slow tests |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 40 | setenv = |
| 41 | {[tempestenv]setenv} |
| 42 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 43 | deps = {[tempestenv]deps} |
Giampaolo Lauria | 7a3e004 | 2013-06-07 14:59:19 -0400 | [diff] [blame] | 44 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 45 | find . -type f -name "*.pyc" -delete |
| 46 | bash tools/pretty_tox.sh '{posargs}' |
Matthew Treinish | 87af1bb | 2013-06-17 15:29:10 -0400 | [diff] [blame] | 47 | |
Matthew Treinish | 3a9d3e7 | 2015-11-20 14:51:31 -0500 | [diff] [blame^] | 48 | [testenv:ostestr] |
| 49 | sitepackages = {[tempestenv]sitepackages} |
| 50 | # 'all' includes slow tests |
| 51 | setenv = |
| 52 | {[tempestenv]setenv} |
| 53 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
| 54 | deps = {[tempestenv]deps} |
| 55 | commands = |
| 56 | find . -type f -name "*.pyc" -delete |
| 57 | ostestr {posargs} |
| 58 | |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 59 | [testenv:all-plugin] |
| 60 | sitepackages = True |
| 61 | # 'all' includes slow tests |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 62 | setenv = |
| 63 | {[tempestenv]setenv} |
| 64 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 65 | deps = {[tempestenv]deps} |
| 66 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 67 | find . -type f -name "*.pyc" -delete |
| 68 | bash tools/pretty_tox.sh '{posargs}' |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 69 | |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 70 | [testenv:full] |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 71 | sitepackages = {[tempestenv]sitepackages} |
| 72 | setenv = {[tempestenv]setenv} |
| 73 | deps = {[tempestenv]deps} |
Matthew Treinish | 59eb0b2 | 2013-08-07 15:48:21 -0400 | [diff] [blame] | 74 | # The regex below is used to select which tests to run and exclude the slow tag: |
Masayuki Igawa | 8352204 | 2015-12-01 16:51:34 +0900 | [diff] [blame] | 75 | # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 |
Matthew Treinish | 83d2ec4 | 2013-07-30 16:37:32 -0400 | [diff] [blame] | 76 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 77 | find . -type f -name "*.pyc" -delete |
| 78 | bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}' |
Matthew Treinish | 83d2ec4 | 2013-07-30 16:37:32 -0400 | [diff] [blame] | 79 | |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 80 | [testenv:full-serial] |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 81 | sitepackages = {[tempestenv]sitepackages} |
| 82 | setenv = {[tempestenv]setenv} |
| 83 | deps = {[tempestenv]deps} |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 84 | # The regex below is used to select which tests to run and exclude the slow tag: |
Masayuki Igawa | 8352204 | 2015-12-01 16:51:34 +0900 | [diff] [blame] | 85 | # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 86 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 87 | find . -type f -name "*.pyc" -delete |
| 88 | bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty)) {posargs}' |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 89 | |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 90 | [testenv:smoke] |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 91 | sitepackages = {[tempestenv]sitepackages} |
| 92 | setenv = {[tempestenv]setenv} |
| 93 | deps = {[tempestenv]deps} |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 94 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 95 | find . -type f -name "*.pyc" -delete |
| 96 | bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}' |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 97 | |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 98 | [testenv:smoke-serial] |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 99 | sitepackages = {[tempestenv]sitepackages} |
| 100 | setenv = {[tempestenv]setenv} |
| 101 | deps = {[tempestenv]deps} |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 102 | # This is still serial because neutron doesn't work with parallel. See: |
| 103 | # https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke |
| 104 | # job would fail if we moved it to parallel. |
| 105 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 106 | find . -type f -name "*.pyc" -delete |
| 107 | bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}' |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 108 | |
Matthew Treinish | cee1177 | 2013-07-02 17:50:41 -0400 | [diff] [blame] | 109 | [testenv:stress] |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 110 | sitepackages = {[tempestenv]sitepackages} |
| 111 | setenv = {[tempestenv]setenv} |
| 112 | deps = {[tempestenv]deps} |
Matthew Treinish | cee1177 | 2013-07-02 17:50:41 -0400 | [diff] [blame] | 113 | commands = |
David Kranz | 03fbe5c | 2014-11-11 15:29:00 -0500 | [diff] [blame] | 114 | run-tempest-stress {posargs} |
Matthew Treinish | cee1177 | 2013-07-02 17:50:41 -0400 | [diff] [blame] | 115 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 116 | [testenv:venv] |
| 117 | commands = {posargs} |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 118 | |
Matthew Treinish | 8bd013e | 2014-06-18 21:58:32 -0400 | [diff] [blame] | 119 | [testenv:docs] |
Mathew Odden | b389faa | 2015-07-30 20:24:08 +0000 | [diff] [blame] | 120 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 121 | python setup.py build_sphinx {posargs} |
Matthew Treinish | 8bd013e | 2014-06-18 21:58:32 -0400 | [diff] [blame] | 122 | |
Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 123 | [testenv:pep8] |
Matthew Treinish | 3d46811 | 2013-10-24 21:49:14 +0000 | [diff] [blame] | 124 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 125 | flake8 {posargs} |
| 126 | check-uuid |
Matthew Treinish | 3d46811 | 2013-10-24 21:49:14 +0000 | [diff] [blame] | 127 | |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 128 | [testenv:uuidgen] |
| 129 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 130 | check-uuid --fix |
Chris Hoge | 296558c | 2015-02-19 00:29:49 -0600 | [diff] [blame] | 131 | |
Giampaolo Lauria | 1b837ce | 2013-05-01 11:22:07 -0400 | [diff] [blame] | 132 | [hacking] |
Giampaolo Lauria | d50c27d | 2013-05-23 15:23:12 -0400 | [diff] [blame] | 133 | local-check-factory = tempest.hacking.checks.factory |
Matthew Treinish | 2b6db0c | 2014-05-17 10:42:36 -0400 | [diff] [blame] | 134 | import_exceptions = tempest.services |
Giampaolo Lauria | 1b837ce | 2013-05-01 11:22:07 -0400 | [diff] [blame] | 135 | |
Monty Taylor | b2ca5ca | 2013-04-28 18:00:21 -0700 | [diff] [blame] | 136 | [flake8] |
Joe Gordon | dca03dd | 2013-07-18 14:10:19 -0700 | [diff] [blame] | 137 | # 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 Treinish | 96e9e88 | 2014-06-09 18:37:19 -0400 | [diff] [blame] | 138 | # E123 skipped because it is ignored by default in the default pep8 |
Matthew Treinish | 1d14c54 | 2014-06-17 20:25:40 -0400 | [diff] [blame] | 139 | # E129 skipped because it is too limiting when combined with other rules |
Joe Gordon | 28788b4 | 2015-02-25 12:42:37 -0800 | [diff] [blame] | 140 | # Skipped because of new hacking 0.9: H405 |
Ken'ichi Ohmichi | 2e2ee19 | 2015-11-19 09:48:27 +0000 | [diff] [blame] | 141 | ignore = E125,E123,E129 |
Monty Taylor | b2ca5ca | 2013-04-28 18:00:21 -0700 | [diff] [blame] | 142 | show-source = True |
| 143 | exclude = .git,.venv,.tox,dist,doc,openstack,*egg |
Andrea Frittoli (andreaf) | 897ecfb | 2016-02-23 10:12:48 -0500 | [diff] [blame] | 144 | |
| 145 | [testenv:releasenotes] |
| 146 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |