Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 1 | [tox] |
Jordan Pittier | cefaa2b | 2016-07-22 13:04:26 +0200 | [diff] [blame] | 2 | envlist = pep8,py35,py34,py27,pip-check-reqs |
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 |
ChangBo Guo(gcb) | cd0374a | 2016-06-29 15:33:56 +0800 | [diff] [blame] | 19 | PYTHONWARNINGS=default::DeprecationWarning |
yan.haifeng | 658544f | 2015-06-12 14:41:41 +0800 | [diff] [blame] | 20 | 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] | 21 | usedevelop = True |
Sean Dague | a646d17 | 2014-02-20 18:50:41 -0500 | [diff] [blame] | 22 | install_command = pip install -U {opts} {packages} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 23 | whitelist_externals = * |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 24 | deps = |
| 25 | -r{toxinidir}/requirements.txt |
| 26 | -r{toxinidir}/test-requirements.txt |
Sean Dague | c7b4d88 | 2014-11-25 08:18:23 -0500 | [diff] [blame] | 27 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 28 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | c3fef9f | 2016-09-09 18:04:50 -0400 | [diff] [blame] | 29 | ostestr {posargs} |
Matthew Treinish | 12fdf4b | 2013-10-03 15:20:09 +0000 | [diff] [blame] | 30 | |
Jon Grimm | 270bd7f | 2014-08-05 18:11:29 +0000 | [diff] [blame] | 31 | [testenv:genconfig] |
Matthew Treinish | bdef1c7 | 2016-06-21 18:06:49 -0400 | [diff] [blame] | 32 | commands = oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf |
Jon Grimm | 270bd7f | 2014-08-05 18:11:29 +0000 | [diff] [blame] | 33 | |
Matthew Treinish | b2f5cad | 2014-01-07 21:54:55 +0000 | [diff] [blame] | 34 | [testenv:cover] |
| 35 | setenv = OS_TEST_PATH=./tempest/tests |
| 36 | commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}' |
| 37 | |
Giampaolo Lauria | 7a3e004 | 2013-06-07 14:59:19 -0400 | [diff] [blame] | 38 | [testenv:all] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 39 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 40 | sitepackages = {[tempestenv]sitepackages} |
David Kranz | f9695d2 | 2014-10-27 11:43:52 -0400 | [diff] [blame] | 41 | # 'all' includes slow tests |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 42 | setenv = |
| 43 | {[tempestenv]setenv} |
| 44 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 45 | deps = {[tempestenv]deps} |
Giampaolo Lauria | 7a3e004 | 2013-06-07 14:59:19 -0400 | [diff] [blame] | 46 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 47 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 48 | tempest run --regex {posargs} |
Matthew Treinish | 87af1bb | 2013-06-17 15:29:10 -0400 | [diff] [blame] | 49 | |
Matthew Treinish | 3a9d3e7 | 2015-11-20 14:51:31 -0500 | [diff] [blame] | 50 | [testenv:ostestr] |
| 51 | sitepackages = {[tempestenv]sitepackages} |
| 52 | # 'all' includes slow tests |
| 53 | setenv = |
| 54 | {[tempestenv]setenv} |
| 55 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
| 56 | deps = {[tempestenv]deps} |
| 57 | commands = |
| 58 | find . -type f -name "*.pyc" -delete |
| 59 | ostestr {posargs} |
| 60 | |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 61 | [testenv:all-plugin] |
| 62 | sitepackages = True |
| 63 | # 'all' includes slow tests |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 64 | setenv = |
| 65 | {[tempestenv]setenv} |
| 66 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 67 | deps = {[tempestenv]deps} |
| 68 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 69 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 70 | tempest run --regex {posargs} |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 71 | |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 72 | [testenv:full] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 73 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 74 | sitepackages = {[tempestenv]sitepackages} |
| 75 | setenv = {[tempestenv]setenv} |
| 76 | deps = {[tempestenv]deps} |
Matthew Treinish | 59eb0b2 | 2013-08-07 15:48:21 -0400 | [diff] [blame] | 77 | # 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] | 78 | # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 |
Matthew Treinish | 83d2ec4 | 2013-07-30 16:37:32 -0400 | [diff] [blame] | 79 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 80 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 81 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs} |
Matthew Treinish | 83d2ec4 | 2013-07-30 16:37:32 -0400 | [diff] [blame] | 82 | |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 83 | [testenv:full-serial] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 84 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 85 | sitepackages = {[tempestenv]sitepackages} |
| 86 | setenv = {[tempestenv]setenv} |
| 87 | deps = {[tempestenv]deps} |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 88 | # 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] | 89 | # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 90 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 91 | find . -type f -name "*.pyc" -delete |
Masayuki Igawa | 730f59b | 2016-09-21 11:47:32 +0200 | [diff] [blame] | 92 | tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs} |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 93 | |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 94 | [testenv:smoke] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 95 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 96 | sitepackages = {[tempestenv]sitepackages} |
| 97 | setenv = {[tempestenv]setenv} |
| 98 | deps = {[tempestenv]deps} |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 99 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 100 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 101 | tempest run --regex '\[.*\bsmoke\b.*\]' {posargs} |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 102 | |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 103 | [testenv:smoke-serial] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 104 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 105 | sitepackages = {[tempestenv]sitepackages} |
| 106 | setenv = {[tempestenv]setenv} |
| 107 | deps = {[tempestenv]deps} |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 108 | # This is still serial because neutron doesn't work with parallel. See: |
| 109 | # https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke |
| 110 | # job would fail if we moved it to parallel. |
| 111 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 112 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 113 | tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs} |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 114 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 115 | [testenv:venv] |
| 116 | commands = {posargs} |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 117 | |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 118 | [testenv:venv-tempest] |
| 119 | envdir = .tox/tempest |
| 120 | sitepackages = {[tempestenv]sitepackages} |
| 121 | setenv = {[tempestenv]setenv} |
| 122 | deps = {[tempestenv]deps} |
| 123 | commands = {posargs} |
| 124 | |
Matthew Treinish | 8bd013e | 2014-06-18 21:58:32 -0400 | [diff] [blame] | 125 | [testenv:docs] |
Mathew Odden | b389faa | 2015-07-30 20:24:08 +0000 | [diff] [blame] | 126 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 127 | python setup.py build_sphinx {posargs} |
Matthew Treinish | 8bd013e | 2014-06-18 21:58:32 -0400 | [diff] [blame] | 128 | |
Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 129 | [testenv:pep8] |
Matthew Treinish | 3d46811 | 2013-10-24 21:49:14 +0000 | [diff] [blame] | 130 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 131 | flake8 {posargs} |
| 132 | check-uuid |
Matthew Treinish | 3d46811 | 2013-10-24 21:49:14 +0000 | [diff] [blame] | 133 | |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 134 | [testenv:uuidgen] |
| 135 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 136 | check-uuid --fix |
Chris Hoge | 296558c | 2015-02-19 00:29:49 -0600 | [diff] [blame] | 137 | |
Giampaolo Lauria | 1b837ce | 2013-05-01 11:22:07 -0400 | [diff] [blame] | 138 | [hacking] |
Giampaolo Lauria | d50c27d | 2013-05-23 15:23:12 -0400 | [diff] [blame] | 139 | local-check-factory = tempest.hacking.checks.factory |
Matthew Treinish | 2b6db0c | 2014-05-17 10:42:36 -0400 | [diff] [blame] | 140 | import_exceptions = tempest.services |
Giampaolo Lauria | 1b837ce | 2013-05-01 11:22:07 -0400 | [diff] [blame] | 141 | |
Monty Taylor | b2ca5ca | 2013-04-28 18:00:21 -0700 | [diff] [blame] | 142 | [flake8] |
Joe Gordon | dca03dd | 2013-07-18 14:10:19 -0700 | [diff] [blame] | 143 | # 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] | 144 | # E123 skipped because it is ignored by default in the default pep8 |
Matthew Treinish | 1d14c54 | 2014-06-17 20:25:40 -0400 | [diff] [blame] | 145 | # E129 skipped because it is too limiting when combined with other rules |
Ken'ichi Ohmichi | 2e2ee19 | 2015-11-19 09:48:27 +0000 | [diff] [blame] | 146 | ignore = E125,E123,E129 |
Monty Taylor | b2ca5ca | 2013-04-28 18:00:21 -0700 | [diff] [blame] | 147 | show-source = True |
ChangBo Guo(gcb) | 6ebbc01 | 2016-09-21 13:40:42 +0800 | [diff] [blame] | 148 | exclude = .git,.venv,.tox,dist,doc,*egg |
Jordan Pittier | 525ec71 | 2016-12-07 17:51:26 +0100 | [diff] [blame] | 149 | enable-extensions = H106,H203,H904 |
Masayuki Igawa | 134d9f7 | 2017-02-10 18:05:26 +0900 | [diff] [blame^] | 150 | import-order-style = pep8 |
Andrea Frittoli (andreaf) | 897ecfb | 2016-02-23 10:12:48 -0500 | [diff] [blame] | 151 | |
| 152 | [testenv:releasenotes] |
| 153 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
Jordan Pittier | cefaa2b | 2016-07-22 13:04:26 +0200 | [diff] [blame] | 154 | |
| 155 | [testenv:pip-check-reqs] |
| 156 | # Do not install test-requirements as that will pollute the virtualenv for |
| 157 | # determining missing packages. |
| 158 | # This also means that pip-check-reqs must be installed separately, outside |
| 159 | # of the requirements.txt files |
| 160 | deps = pip_check_reqs |
| 161 | -r{toxinidir}/requirements.txt |
| 162 | commands= |
| 163 | pip-extra-reqs -d --ignore-file=tempest/tests/* tempest |
| 164 | pip-missing-reqs -d --ignore-file=tempest/tests/* tempest |
Chandan Kumar | ac5c553 | 2016-11-30 18:49:26 +0530 | [diff] [blame] | 165 | |
| 166 | |
| 167 | [testenv:bindep] |
| 168 | # Do not install any requirements. We want this to be fast and work even if |
| 169 | # system dependencies are missing, since it's used to tell you what system |
| 170 | # dependencies are missing! This also means that bindep must be installed |
| 171 | # separately, outside of the requirements files. |
| 172 | deps = bindep |
| 173 | commands = bindep test |