Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 1 | [tox] |
Ghanshyam Mann | de69845 | 2020-05-04 14:16:54 -0500 | [diff] [blame] | 2 | envlist = pep8,py36,py38,bashate,pip-check-reqs |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 3 | minversion = 3.18.0 |
Matthew Treinish | 7228e11 | 2013-10-03 14:58:54 +0000 | [diff] [blame] | 4 | skipsdist = True |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 5 | ignore_basepython_conflict = True |
Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 6 | |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 7 | [tempestenv] |
Lee Yarwood | bc9fe8e | 2020-01-28 21:27:59 +0000 | [diff] [blame] | 8 | basepython = python3 |
Joe Gordon | 9f1612e | 2015-01-28 11:23:43 -0800 | [diff] [blame] | 9 | sitepackages = False |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 10 | setenv = |
| 11 | VIRTUAL_ENV={envdir} |
| 12 | OS_TEST_PATH=./tempest/test_discover |
| 13 | deps = |
Martin Kopec | 4a25003 | 2021-03-26 15:13:10 +0000 | [diff] [blame] | 14 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 15 | -r{toxinidir}/requirements.txt |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 16 | |
| 17 | [testenv] |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 18 | basepython = python3 |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 19 | setenv = |
| 20 | VIRTUAL_ENV={envdir} |
Andrea Frittoli | 8f018cb | 2017-08-11 14:36:18 +0100 | [diff] [blame] | 21 | OS_LOG_CAPTURE=1 |
Matthew Treinish | 5cc9289 | 2018-02-22 15:53:47 -0500 | [diff] [blame] | 22 | OS_STDOUT_CAPTURE=1 |
| 23 | OS_STDERR_CAPTURE=1 |
| 24 | OS_TEST_TIMEOUT=160 |
Stephen Finucane | a6353c4 | 2018-07-06 14:00:36 +0100 | [diff] [blame] | 25 | PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site |
Ghanshyam | 9cee538 | 2020-02-01 20:18:56 -0600 | [diff] [blame] | 26 | passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_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] | 27 | usedevelop = True |
Andreas Jaeger | 880d943 | 2017-12-01 07:38:54 +0100 | [diff] [blame] | 28 | install_command = pip install {opts} {packages} |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 29 | allowlist_externals = * |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 30 | deps = |
Martin Kopec | 4a25003 | 2021-03-26 15:13:10 +0000 | [diff] [blame] | 31 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 32 | -r{toxinidir}/requirements.txt |
| 33 | -r{toxinidir}/test-requirements.txt |
Sean Dague | c7b4d88 | 2014-11-25 08:18:23 -0500 | [diff] [blame] | 34 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 35 | find . -type f -name "*.pyc" -delete |
Masayuki Igawa | d0b8ebd | 2017-09-14 14:51:25 -0600 | [diff] [blame] | 36 | stestr --test-path ./tempest/tests run {posargs} |
Matthew Treinish | 12fdf4b | 2013-10-03 15:20:09 +0000 | [diff] [blame] | 37 | |
Jon Grimm | 270bd7f | 2014-08-05 18:11:29 +0000 | [diff] [blame] | 38 | [testenv:genconfig] |
Matthew Treinish | bdef1c7 | 2016-06-21 18:06:49 -0400 | [diff] [blame] | 39 | commands = oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf |
Jon Grimm | 270bd7f | 2014-08-05 18:11:29 +0000 | [diff] [blame] | 40 | |
Matthew Treinish | b2f5cad | 2014-01-07 21:54:55 +0000 | [diff] [blame] | 41 | [testenv:cover] |
Matthew Treinish | 069d828 | 2017-11-28 19:19:27 -0500 | [diff] [blame] | 42 | setenv = |
| 43 | {[testenv]setenv} |
| 44 | PYTHON=coverage run --source tempest --parallel-mode |
| 45 | commands = |
| 46 | coverage erase |
| 47 | find . -type f -name "*.pyc" -delete |
| 48 | stestr --test-path ./tempest/tests run {posargs} |
| 49 | coverage combine |
| 50 | coverage html -d cover |
| 51 | coverage xml -o cover/coverage.xml |
| 52 | coverage report |
Matthew Treinish | b2f5cad | 2014-01-07 21:54:55 +0000 | [diff] [blame] | 53 | |
Manik Bindlish | 8a7aaa5 | 2018-11-30 10:22:30 +0000 | [diff] [blame] | 54 | [testenv:debug] |
Manik Bindlish | 8a7aaa5 | 2018-11-30 10:22:30 +0000 | [diff] [blame] | 55 | commands = oslo_debug_helper -t tempest/tests {posargs} |
| 56 | |
Giampaolo Lauria | 7a3e004 | 2013-06-07 14:59:19 -0400 | [diff] [blame] | 57 | [testenv:all] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 58 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 59 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 60 | basepython = {[tempestenv]basepython} |
David Kranz | f9695d2 | 2014-10-27 11:43:52 -0400 | [diff] [blame] | 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} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 65 | deps = {[tempestenv]deps} |
Giampaolo Lauria | 7a3e004 | 2013-06-07 14:59:19 -0400 | [diff] [blame] | 66 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 67 | find . -type f -name "*.pyc" -delete |
Masayuki Igawa | fe0de68 | 2019-05-21 17:04:28 +0900 | [diff] [blame] | 68 | tempest run --regex {posargs:''} |
Matthew Treinish | 87af1bb | 2013-06-17 15:29:10 -0400 | [diff] [blame] | 69 | |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 70 | [testenv:all-plugin] |
Andrea Frittoli | 35d12ca | 2018-02-13 15:42:25 +0000 | [diff] [blame] | 71 | # DEPRECATED |
| 72 | # NOTE(andreaf) The all-plugin tox env uses sitepackages |
| 73 | # so that plugins installed outsite of Tempest virtual environment |
| 74 | # can be discovered. After the implementation during the Queens |
| 75 | # release cycle of the goal of moving Tempest plugins in dedicated |
| 76 | # git repos, this environment should not be used anymore. "all" |
| 77 | # should be used instead with the appropriate regex filtering. |
| 78 | sitepackages = True |
| 79 | # 'all' includes slow tests |
| 80 | setenv = |
| 81 | {[tempestenv]setenv} |
| 82 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 83 | basepython = {[tempestenv]basepython} |
Andrea Frittoli | 35d12ca | 2018-02-13 15:42:25 +0000 | [diff] [blame] | 84 | deps = {[tempestenv]deps} |
| 85 | commands = |
| 86 | echo "WARNING: The all-plugin env is deprecated and will be removed" |
| 87 | echo "WARNING Please use the 'all' environment for Tempest plugins." |
| 88 | find . -type f -name "*.pyc" -delete |
Masayuki Igawa | fe0de68 | 2019-05-21 17:04:28 +0900 | [diff] [blame] | 89 | tempest run --regex {posargs:''} |
Andrea Frittoli | 35d12ca | 2018-02-13 15:42:25 +0000 | [diff] [blame] | 90 | |
| 91 | [testenv:all-site-packages] |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 92 | sitepackages = True |
| 93 | # 'all' includes slow tests |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 94 | setenv = |
| 95 | {[tempestenv]setenv} |
| 96 | OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:1200} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 97 | basepython = {[tempestenv]basepython} |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 98 | deps = {[tempestenv]deps} |
| 99 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 100 | find . -type f -name "*.pyc" -delete |
Masayuki Igawa | fe0de68 | 2019-05-21 17:04:28 +0900 | [diff] [blame] | 101 | tempest run --regex {posargs:''} |
Marc Koderer | c2f9b3a | 2015-07-27 15:19:08 +0200 | [diff] [blame] | 102 | |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 103 | [testenv:full] |
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} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 106 | basepython = {[tempestenv]basepython} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 107 | setenv = {[tempestenv]setenv} |
| 108 | deps = {[tempestenv]deps} |
Matthew Treinish | 59eb0b2 | 2013-08-07 15:48:21 -0400 | [diff] [blame] | 109 | # 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] | 110 | # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 111 | # FIXME: We can replace it with the `--exclude-regex` option to exclude tests now. |
Matthew Treinish | 83d2ec4 | 2013-07-30 16:37:32 -0400 | [diff] [blame] | 112 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 113 | find . -type f -name "*.pyc" -delete |
Sean Dague | 49505df | 2017-03-01 11:35:58 -0500 | [diff] [blame] | 114 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs} |
| 115 | tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' {posargs} |
Matthew Treinish | 83d2ec4 | 2013-07-30 16:37:32 -0400 | [diff] [blame] | 116 | |
Attila Fazekas | 3f219f5 | 2018-03-01 16:50:10 +0000 | [diff] [blame] | 117 | [testenv:full-parallel] |
| 118 | envdir = .tox/tempest |
| 119 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 120 | basepython = {[tempestenv]basepython} |
Attila Fazekas | 3f219f5 | 2018-03-01 16:50:10 +0000 | [diff] [blame] | 121 | setenv = {[tempestenv]setenv} |
| 122 | deps = {[tempestenv]deps} |
| 123 | # The regex below is used to select all tempest scenario and including the non slow api tests |
| 124 | commands = |
| 125 | find . -type f -name "*.pyc" -delete |
| 126 | tempest run --regex '(^tempest\.scenario.*)|(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs} |
| 127 | |
Ghanshyam | 5072a24 | 2019-07-03 14:40:53 +0000 | [diff] [blame] | 128 | [testenv:integrated-network] |
| 129 | envdir = .tox/tempest |
| 130 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 131 | basepython = {[tempestenv]basepython} |
Ghanshyam | 5072a24 | 2019-07-03 14:40:53 +0000 | [diff] [blame] | 132 | setenv = {[tempestenv]setenv} |
| 133 | deps = {[tempestenv]deps} |
| 134 | # The regex below is used to select which tests to run and exclude the slow tag and |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 135 | # tests listed in exclude-list file: |
Ghanshyam | 5072a24 | 2019-07-03 14:40:53 +0000 | [diff] [blame] | 136 | commands = |
| 137 | find . -type f -name "*.pyc" -delete |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 138 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs} |
Lance Bragstad | 7b98ea5 | 2021-02-10 03:49:01 +0000 | [diff] [blame] | 139 | tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --exclude-list ./tools/tempest-integrated-gate-networking-exclude-list.txt {posargs} |
Ghanshyam | 5072a24 | 2019-07-03 14:40:53 +0000 | [diff] [blame] | 140 | |
Ghanshyam | ee7fd1f | 2019-07-05 09:36:57 +0000 | [diff] [blame] | 141 | [testenv:integrated-compute] |
| 142 | envdir = .tox/tempest |
| 143 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 144 | basepython = {[tempestenv]basepython} |
Ghanshyam | ee7fd1f | 2019-07-05 09:36:57 +0000 | [diff] [blame] | 145 | setenv = {[tempestenv]setenv} |
| 146 | deps = {[tempestenv]deps} |
| 147 | # The regex below is used to select which tests to run and exclude the slow tag and |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 148 | # tests listed in exclude-list file: |
Ghanshyam | ee7fd1f | 2019-07-05 09:36:57 +0000 | [diff] [blame] | 149 | commands = |
| 150 | find . -type f -name "*.pyc" -delete |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 151 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs} |
| 152 | tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --exclude-list ./tools/tempest-integrated-gate-compute-exclude-list.txt {posargs} |
Ghanshyam | ee7fd1f | 2019-07-05 09:36:57 +0000 | [diff] [blame] | 153 | |
Ghanshyam | 31609dc | 2019-07-05 09:23:37 +0000 | [diff] [blame] | 154 | [testenv:integrated-placement] |
| 155 | envdir = .tox/tempest |
| 156 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 157 | basepython = {[tempestenv]basepython} |
Ghanshyam | 31609dc | 2019-07-05 09:23:37 +0000 | [diff] [blame] | 158 | setenv = {[tempestenv]setenv} |
| 159 | deps = {[tempestenv]deps} |
| 160 | # The regex below is used to select which tests to run and exclude the slow tag and |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 161 | # tests listed in exclude-list file: |
Ghanshyam | 31609dc | 2019-07-05 09:23:37 +0000 | [diff] [blame] | 162 | commands = |
| 163 | find . -type f -name "*.pyc" -delete |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 164 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs} |
| 165 | tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --exclude-list ./tools/tempest-integrated-gate-placement-exclude-list.txt {posargs} |
Ghanshyam | 31609dc | 2019-07-05 09:23:37 +0000 | [diff] [blame] | 166 | |
Ghanshyam Mann | a699445 | 2019-07-05 08:43:23 +0000 | [diff] [blame] | 167 | [testenv:integrated-storage] |
| 168 | envdir = .tox/tempest |
| 169 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 170 | basepython = {[tempestenv]basepython} |
Ghanshyam Mann | a699445 | 2019-07-05 08:43:23 +0000 | [diff] [blame] | 171 | setenv = {[tempestenv]setenv} |
| 172 | deps = {[tempestenv]deps} |
| 173 | # The regex below is used to select which tests to run and exclude the slow tag and |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 174 | # tests listed in exclude-list file: |
Ghanshyam Mann | a699445 | 2019-07-05 08:43:23 +0000 | [diff] [blame] | 175 | commands = |
| 176 | find . -type f -name "*.pyc" -delete |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 177 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs} |
| 178 | tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --exclude-list ./tools/tempest-integrated-gate-storage-exclude-list.txt {posargs} |
Ghanshyam Mann | a699445 | 2019-07-05 08:43:23 +0000 | [diff] [blame] | 179 | |
Ghanshyam | 9535852 | 2019-07-05 08:58:32 +0000 | [diff] [blame] | 180 | [testenv:integrated-object-storage] |
| 181 | envdir = .tox/tempest |
| 182 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 183 | basepython = {[tempestenv]basepython} |
Ghanshyam | 9535852 | 2019-07-05 08:58:32 +0000 | [diff] [blame] | 184 | setenv = {[tempestenv]setenv} |
| 185 | deps = {[tempestenv]deps} |
| 186 | # The regex below is used to select which tests to run and exclude the slow tag and |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 187 | # tests listed in exclude-list file: |
Ghanshyam | 9535852 | 2019-07-05 08:58:32 +0000 | [diff] [blame] | 188 | commands = |
| 189 | find . -type f -name "*.pyc" -delete |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 190 | tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs} |
| 191 | tempest run --combine --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.scenario)' --exclude-list ./tools/tempest-integrated-gate-object-storage-exclude-list.txt {posargs} |
Ghanshyam | 9535852 | 2019-07-05 08:58:32 +0000 | [diff] [blame] | 192 | |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 193 | [testenv:full-serial] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 194 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 195 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 196 | basepython = {[tempestenv]basepython} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 197 | setenv = {[tempestenv]setenv} |
| 198 | deps = {[tempestenv]deps} |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 199 | # 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] | 200 | # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 201 | # FIXME: We can replace it with the `--exclude-regex` option to exclude tests now. |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 202 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 203 | find . -type f -name "*.pyc" -delete |
Masayuki Igawa | 730f59b | 2016-09-21 11:47:32 +0200 | [diff] [blame] | 204 | tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs} |
Matthew Treinish | 99288cd | 2014-02-10 09:21:51 -0500 | [diff] [blame] | 205 | |
Andrea Frittoli | b838af9 | 2017-03-06 15:11:13 +0000 | [diff] [blame] | 206 | [testenv:scenario] |
| 207 | envdir = .tox/tempest |
| 208 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 209 | basepython = {[tempestenv]basepython} |
Andrea Frittoli | b838af9 | 2017-03-06 15:11:13 +0000 | [diff] [blame] | 210 | setenv = {[tempestenv]setenv} |
| 211 | deps = {[tempestenv]deps} |
| 212 | # The regex below is used to select all scenario tests |
| 213 | commands = |
| 214 | find . -type f -name "*.pyc" -delete |
| 215 | tempest run --serial --regex '(^tempest\.scenario)' {posargs} |
| 216 | |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 217 | [testenv:smoke] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 218 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 219 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 220 | basepython = {[tempestenv]basepython} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 221 | setenv = {[tempestenv]setenv} |
| 222 | deps = {[tempestenv]deps} |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 223 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 224 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 225 | tempest run --regex '\[.*\bsmoke\b.*\]' {posargs} |
Monty Taylor | 8d4c90c | 2013-05-02 14:33:18 -0400 | [diff] [blame] | 226 | |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 227 | [testenv:smoke-serial] |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 228 | envdir = .tox/tempest |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 229 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 230 | basepython = {[tempestenv]basepython} |
Matthew Treinish | 5b7626a | 2014-09-23 17:39:38 -0400 | [diff] [blame] | 231 | setenv = {[tempestenv]setenv} |
| 232 | deps = {[tempestenv]deps} |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 233 | # This is still serial because neutron doesn't work with parallel. See: |
| 234 | # https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke |
| 235 | # job would fail if we moved it to parallel. |
| 236 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 237 | find . -type f -name "*.pyc" -delete |
Matthew Treinish | 68c7871 | 2016-07-28 14:47:27 -0400 | [diff] [blame] | 238 | tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs} |
Joe Gordon | d279629 | 2013-11-14 12:55:55 -0800 | [diff] [blame] | 239 | |
ghanshyam | 10326c7 | 2018-08-01 08:53:00 +0000 | [diff] [blame] | 240 | [testenv:slow-serial] |
| 241 | envdir = .tox/tempest |
| 242 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 243 | basepython = {[tempestenv]basepython} |
ghanshyam | 10326c7 | 2018-08-01 08:53:00 +0000 | [diff] [blame] | 244 | setenv = {[tempestenv]setenv} |
| 245 | deps = {[tempestenv]deps} |
| 246 | # The regex below is used to select the slow tagged tests to run serially: |
| 247 | commands = |
| 248 | find . -type f -name "*.pyc" -delete |
| 249 | tempest run --serial --regex '\[.*\bslow\b.*\]' {posargs} |
| 250 | |
Ghanshyam | a0b8ca4 | 2019-07-17 09:46:41 +0000 | [diff] [blame] | 251 | [testenv:ipv6-only] |
| 252 | envdir = .tox/tempest |
| 253 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 254 | basepython = {[tempestenv]basepython} |
Ghanshyam | a0b8ca4 | 2019-07-17 09:46:41 +0000 | [diff] [blame] | 255 | setenv = {[tempestenv]setenv} |
| 256 | deps = {[tempestenv]deps} |
| 257 | # Run only smoke and ipv6 tests. This env is used to tests |
| 258 | # the ipv6 deployments and basic tests run fine so that we can |
| 259 | # verify that services listen on IPv6 address. |
| 260 | commands = |
| 261 | find . -type f -name "*.pyc" -delete |
| 262 | tempest run --regex '\[.*\bsmoke|ipv6|test_network_v6\b.*\]' {posargs} |
| 263 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 264 | [testenv:venv] |
Matt Riedemann | d5e9282 | 2018-01-25 11:25:57 -0500 | [diff] [blame] | 265 | deps = |
Martin Kopec | 4a25003 | 2021-03-26 15:13:10 +0000 | [diff] [blame] | 266 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Matt Riedemann | d5e9282 | 2018-01-25 11:25:57 -0500 | [diff] [blame] | 267 | -r{toxinidir}/requirements.txt |
| 268 | -r{toxinidir}/doc/requirements.txt |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 269 | commands = {posargs} |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 270 | |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 271 | [testenv:venv-tempest] |
| 272 | envdir = .tox/tempest |
| 273 | sitepackages = {[tempestenv]sitepackages} |
Ghanshyam | 1c680fd | 2020-01-20 11:43:29 -0600 | [diff] [blame] | 274 | basepython = {[tempestenv]basepython} |
Matthew Treinish | 0e25a90 | 2016-04-29 16:38:51 -0400 | [diff] [blame] | 275 | setenv = {[tempestenv]setenv} |
| 276 | deps = {[tempestenv]deps} |
| 277 | commands = {posargs} |
| 278 | |
Matthew Treinish | 8bd013e | 2014-06-18 21:58:32 -0400 | [diff] [blame] | 279 | [testenv:docs] |
junboli | 173b11c | 2018-01-15 11:25:35 +0800 | [diff] [blame] | 280 | deps = |
Martin Kopec | 4a25003 | 2021-03-26 15:13:10 +0000 | [diff] [blame] | 281 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
junboli | 173b11c | 2018-01-15 11:25:35 +0800 | [diff] [blame] | 282 | -r{toxinidir}/doc/requirements.txt |
Mathew Odden | b389faa | 2015-07-30 20:24:08 +0000 | [diff] [blame] | 283 | commands = |
Lukas Piwowarski | a905501 | 2020-06-15 17:16:15 +0200 | [diff] [blame] | 284 | sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute |
| 285 | sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity |
| 286 | sphinx-apidoc -f -o doc/source/tests/image tempest/api/image |
| 287 | sphinx-apidoc -f -o doc/source/tests/network tempest/api/network |
| 288 | sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage |
| 289 | sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario |
| 290 | sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume |
junboli | 173b11c | 2018-01-15 11:25:35 +0800 | [diff] [blame] | 291 | rm -rf doc/build |
Ihar Hrachyshka | 8032b2e | 2017-11-27 14:16:59 -0800 | [diff] [blame] | 292 | sphinx-build -W -b html doc/source doc/build/html |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 293 | allowlist_externals = |
Lukas Piwowarski | a905501 | 2020-06-15 17:16:15 +0200 | [diff] [blame] | 294 | rm |
Matthew Treinish | 8bd013e | 2014-06-18 21:58:32 -0400 | [diff] [blame] | 295 | |
Masayuki Igawa | 7e4ef4c | 2019-07-03 17:17:44 +0900 | [diff] [blame] | 296 | [testenv:pdf-docs] |
Masayuki Igawa | 7e4ef4c | 2019-07-03 17:17:44 +0900 | [diff] [blame] | 297 | deps = {[testenv:docs]deps} |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 298 | allowlist_externals = |
Lukas Piwowarski | a905501 | 2020-06-15 17:16:15 +0200 | [diff] [blame] | 299 | rm |
Masayuki Igawa | 7e4ef4c | 2019-07-03 17:17:44 +0900 | [diff] [blame] | 300 | make |
| 301 | commands = |
Lukas Piwowarski | a905501 | 2020-06-15 17:16:15 +0200 | [diff] [blame] | 302 | sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute |
| 303 | sphinx-apidoc -f -o doc/source/tests/identity tempest/api/identity |
| 304 | sphinx-apidoc -f -o doc/source/tests/image tempest/api/image |
| 305 | sphinx-apidoc -f -o doc/source/tests/network tempest/api/network |
| 306 | sphinx-apidoc -f -o doc/source/tests/object_storage tempest/api/object_storage |
| 307 | sphinx-apidoc -f -o doc/source/tests/scenario tempest/scenario |
| 308 | sphinx-apidoc -f -o doc/source/tests/volume tempest/api/volume |
Masayuki Igawa | 7e4ef4c | 2019-07-03 17:17:44 +0900 | [diff] [blame] | 309 | sphinx-build -W -b latex doc/source doc/build/pdf |
| 310 | make -C doc/build/pdf |
| 311 | |
Jay Pipes | a6aa5f2 | 2012-07-24 19:40:29 -0400 | [diff] [blame] | 312 | [testenv:pep8] |
afazekas | 40fcb9b | 2019-03-08 11:25:11 +0100 | [diff] [blame] | 313 | deps = |
Attila Fazekas | c07edb5 | 2019-03-17 15:38:03 +0100 | [diff] [blame] | 314 | -r{toxinidir}/test-requirements.txt |
afazekas | 40fcb9b | 2019-03-08 11:25:11 +0100 | [diff] [blame] | 315 | autopep8 |
Matthew Treinish | 3d46811 | 2013-10-24 21:49:14 +0000 | [diff] [blame] | 316 | commands = |
afazekas | 40fcb9b | 2019-03-08 11:25:11 +0100 | [diff] [blame] | 317 | autopep8 --exit-code --max-line-length=79 --experimental --diff -r tempest setup.py |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 318 | flake8 {posargs} |
| 319 | check-uuid |
Matthew Treinish | 3d46811 | 2013-10-24 21:49:14 +0000 | [diff] [blame] | 320 | |
afazekas | 40fcb9b | 2019-03-08 11:25:11 +0100 | [diff] [blame] | 321 | [testenv:autopep8] |
| 322 | deps = autopep8 |
afazekas | 40fcb9b | 2019-03-08 11:25:11 +0100 | [diff] [blame] | 323 | commands = |
Attila Fazekas | c07edb5 | 2019-03-17 15:38:03 +0100 | [diff] [blame] | 324 | {toxinidir}/tools/format.sh |
afazekas | 40fcb9b | 2019-03-08 11:25:11 +0100 | [diff] [blame] | 325 | |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 326 | [testenv:uuidgen] |
| 327 | commands = |
Masayuki Igawa | d81d3ce | 2016-04-20 15:00:54 +0900 | [diff] [blame] | 328 | check-uuid --fix |
Chris Hoge | 296558c | 2015-02-19 00:29:49 -0600 | [diff] [blame] | 329 | |
Giampaolo Lauria | 1b837ce | 2013-05-01 11:22:07 -0400 | [diff] [blame] | 330 | [hacking] |
Matthew Treinish | 2b6db0c | 2014-05-17 10:42:36 -0400 | [diff] [blame] | 331 | import_exceptions = tempest.services |
Giampaolo Lauria | 1b837ce | 2013-05-01 11:22:07 -0400 | [diff] [blame] | 332 | |
Monty Taylor | b2ca5ca | 2013-04-28 18:00:21 -0700 | [diff] [blame] | 333 | [flake8] |
caoyuan | 349ba75 | 2019-04-23 19:40:06 +0800 | [diff] [blame] | 334 | # E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.opendev.org/#/c/36788/ |
Matthew Treinish | 96e9e88 | 2014-06-09 18:37:19 -0400 | [diff] [blame] | 335 | # E123 skipped because it is ignored by default in the default pep8 |
Matthew Treinish | 1d14c54 | 2014-06-17 20:25:40 -0400 | [diff] [blame] | 336 | # E129 skipped because it is too limiting when combined with other rules |
Stephen Finucane | fc42cc6 | 2018-07-06 13:39:55 +0100 | [diff] [blame] | 337 | # W504 skipped because it is overeager and unnecessary |
| 338 | ignore = E125,E123,E129,W504 |
Monty Taylor | b2ca5ca | 2013-04-28 18:00:21 -0700 | [diff] [blame] | 339 | show-source = True |
junboli | 8bd00e3 | 2017-08-22 17:06:15 +0800 | [diff] [blame] | 340 | exclude = .git,.venv,.tox,dist,doc,*egg,build |
Jordan Pittier | 525ec71 | 2016-12-07 17:51:26 +0100 | [diff] [blame] | 341 | enable-extensions = H106,H203,H904 |
Masayuki Igawa | 134d9f7 | 2017-02-10 18:05:26 +0900 | [diff] [blame] | 342 | import-order-style = pep8 |
Andrea Frittoli (andreaf) | 897ecfb | 2016-02-23 10:12:48 -0500 | [diff] [blame] | 343 | |
Andreas Jaeger | f27a334 | 2020-03-29 10:21:39 +0200 | [diff] [blame] | 344 | [flake8:local-plugins] |
| 345 | extension = |
| 346 | T102 = checks:import_no_clients_in_api_and_scenario_tests |
| 347 | T104 = checks:scenario_tests_need_service_tags |
| 348 | T105 = checks:no_setup_teardown_class_for_tests |
| 349 | T107 = checks:service_tags_not_in_module_path |
| 350 | T108 = checks:no_hyphen_at_end_of_rand_name |
| 351 | N322 = checks:no_mutable_default_args |
| 352 | T109 = checks:no_testtools_skip_decorator |
| 353 | T110 = checks:get_resources_on_service_clients |
| 354 | T111 = checks:delete_resources_on_service_clients |
| 355 | T112 = checks:dont_import_local_tempest_into_lib |
| 356 | T113 = checks:use_rand_uuid_instead_of_uuid4 |
| 357 | T114 = checks:dont_use_config_in_tempest_lib |
| 358 | T115 = checks:dont_put_admin_tests_on_nonadmin_path |
| 359 | T116 = checks:unsupported_exception_attribute_PY3 |
| 360 | T117 = checks:negative_test_attribute_always_applied_to_negative_tests |
| 361 | paths = |
| 362 | ./tempest/hacking |
| 363 | |
Andrea Frittoli (andreaf) | 897ecfb | 2016-02-23 10:12:48 -0500 | [diff] [blame] | 364 | [testenv:releasenotes] |
junboli | 173b11c | 2018-01-15 11:25:35 +0800 | [diff] [blame] | 365 | deps = |
Martin Kopec | 4a25003 | 2021-03-26 15:13:10 +0000 | [diff] [blame] | 366 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
junboli | 173b11c | 2018-01-15 11:25:35 +0800 | [diff] [blame] | 367 | -r{toxinidir}/doc/requirements.txt |
junboli | 8bd00e3 | 2017-08-22 17:06:15 +0800 | [diff] [blame] | 368 | commands = |
junboli | 173b11c | 2018-01-15 11:25:35 +0800 | [diff] [blame] | 369 | rm -rf releasenotes/build |
| 370 | sphinx-build -a -E -W -d releasenotes/build/doctrees \ |
| 371 | -b html releasenotes/source releasenotes/build/html |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 372 | allowlist_externals = rm |
Jordan Pittier | cefaa2b | 2016-07-22 13:04:26 +0200 | [diff] [blame] | 373 | |
Masayuki Igawa | de1153b | 2019-07-30 18:02:07 +0900 | [diff] [blame] | 374 | [testenv:bashate] |
Masayuki Igawa | de1153b | 2019-07-30 18:02:07 +0900 | [diff] [blame] | 375 | # if you want to test out some changes you have made to bashate |
| 376 | # against tempest, just set BASHATE_INSTALL_PATH=/path/... to your |
| 377 | # modified bashate tree |
| 378 | deps = |
| 379 | {env:BASHATE_INSTALL_PATH:bashate} |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 380 | allowlist_externals = bash |
Masayuki Igawa | de1153b | 2019-07-30 18:02:07 +0900 | [diff] [blame] | 381 | commands = bash -c "find {toxinidir}/tools \ |
| 382 | -not \( -type d -name .?\* -prune \) \ |
| 383 | -type f \ |
| 384 | -name \*.sh \ |
Masayuki Igawa | fdd9644 | 2019-08-02 13:44:49 +0900 | [diff] [blame] | 385 | -print0 | xargs -0 bashate -v -eE005,E042 -i E006" |
Masayuki Igawa | de1153b | 2019-07-30 18:02:07 +0900 | [diff] [blame] | 386 | |
Jordan Pittier | cefaa2b | 2016-07-22 13:04:26 +0200 | [diff] [blame] | 387 | [testenv:pip-check-reqs] |
| 388 | # Do not install test-requirements as that will pollute the virtualenv for |
| 389 | # determining missing packages. |
| 390 | # This also means that pip-check-reqs must be installed separately, outside |
| 391 | # of the requirements.txt files |
| 392 | deps = pip_check_reqs |
| 393 | -r{toxinidir}/requirements.txt |
| 394 | commands= |
| 395 | pip-extra-reqs -d --ignore-file=tempest/tests/* tempest |
| 396 | pip-missing-reqs -d --ignore-file=tempest/tests/* tempest |
Chandan Kumar | ac5c553 | 2016-11-30 18:49:26 +0530 | [diff] [blame] | 397 | |
| 398 | |
| 399 | [testenv:bindep] |
| 400 | # Do not install any requirements. We want this to be fast and work even if |
| 401 | # system dependencies are missing, since it's used to tell you what system |
| 402 | # dependencies are missing! This also means that bindep must be installed |
| 403 | # separately, outside of the requirements files. |
| 404 | deps = bindep |
| 405 | commands = bindep test |
Chandan Kumar | b7affe4 | 2017-06-29 13:57:01 +0530 | [diff] [blame] | 406 | |
| 407 | [testenv:plugin-sanity-check] |
| 408 | # perform tempest plugin sanity |
Martin Kopec | dc84423 | 2020-12-24 15:57:53 +0000 | [diff] [blame] | 409 | allowlist_externals = bash |
Chandan Kumar | b7affe4 | 2017-06-29 13:57:01 +0530 | [diff] [blame] | 410 | commands = |
| 411 | bash tools/tempest-plugin-sanity.sh |
Ghanshyam Mann | 83d13e5 | 2020-12-29 13:13:40 -0600 | [diff] [blame^] | 412 | |
| 413 | [testenv:stestr-master] |
| 414 | envdir = .tox/tempest |
| 415 | sitepackages = {[tempestenv]sitepackages} |
| 416 | basepython = {[tempestenv]basepython} |
| 417 | setenv = {[tempestenv]setenv} |
| 418 | deps = {[tempestenv]deps} |
| 419 | # The below command install stestr master version and run smoke tests |
| 420 | commands = |
| 421 | find . -type f -name "*.pyc" -delete |
| 422 | pip install -U git+https://github.com/mtreinish/stestr |
| 423 | tempest run --regex '\[.*\bsmoke\b.*\]' {posargs} |