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