diff options
author | Doug Hellmann <doug@doughellmann.com> | 2018-06-06 16:06:01 -0400 |
---|---|---|
committer | Doug Hellmann <doug@doughellmann.com> | 2018-06-06 16:06:01 -0400 |
commit | a245fd5f8f6306ac171cfe8907b3b4bb99016a00 (patch) | |
tree | 0129ebee33a18ba28996a4c4334c179b3d62c276 /tox.ini | |
parent | 7f990ffa16117769f7616779dd94f81c8d676511 (diff) |
fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I59ac21cb0d34f0b6767c736d0419eb6b874efca1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Notes
Notes (review):
Code-Review+2: Goutham Pacha Ravi <gouthampravi@gmail.com>
Code-Review+1: Nguyen Hai <nguyentrihai93@gmail.com>
Code-Review+1: zhongshengping <chdzsp@163.com>
Code-Review+2: zhongjun <jun.zhongjun2@gmail.com>
Workflow+1: zhongjun <jun.zhongjun2@gmail.com>
Verified+2: Zuul
Submitted-by: Zuul
Submitted-at: Fri, 08 Jun 2018 18:59:51 +0000
Reviewed-on: https://review.openstack.org/572965
Project: openstack/manila
Branch: refs/heads/master
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -16,6 +16,7 @@ commands = | |||
16 | stestr slowest | 16 | stestr slowest |
17 | 17 | ||
18 | [testenv:releasenotes] | 18 | [testenv:releasenotes] |
19 | basepython = python3 | ||
19 | deps = | 20 | deps = |
20 | -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} | 21 | -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} |
21 | -r{toxinidir}/requirements.txt | 22 | -r{toxinidir}/requirements.txt |
@@ -27,6 +28,7 @@ commands = | |||
27 | whitelist_externals = rm | 28 | whitelist_externals = rm |
28 | 29 | ||
29 | [testenv:debug] | 30 | [testenv:debug] |
31 | basepython = python3 | ||
30 | commands = oslo_debug_helper {posargs} | 32 | commands = oslo_debug_helper {posargs} |
31 | 33 | ||
32 | [testenv:debug-py27] | 34 | [testenv:debug-py27] |
@@ -60,17 +62,21 @@ commands = | |||
60 | {toxinidir}/tools/check_logging.sh {toxinidir}/manila | 62 | {toxinidir}/tools/check_logging.sh {toxinidir}/manila |
61 | 63 | ||
62 | [testenv:genconfig] | 64 | [testenv:genconfig] |
65 | basepython = python3 | ||
63 | whitelist_externals = bash | 66 | whitelist_externals = bash |
64 | commands = | 67 | commands = |
65 | oslo-config-generator --config-file etc/oslo-config-generator/manila.conf | 68 | oslo-config-generator --config-file etc/oslo-config-generator/manila.conf |
66 | 69 | ||
67 | [testenv:genpolicy] | 70 | [testenv:genpolicy] |
71 | basepython = python3 | ||
68 | commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf | 72 | commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf |
69 | 73 | ||
70 | [testenv:venv] | 74 | [testenv:venv] |
75 | basepython = python3 | ||
71 | commands = {posargs} | 76 | commands = {posargs} |
72 | 77 | ||
73 | [testenv:docs] | 78 | [testenv:docs] |
79 | basepython = python3 | ||
74 | deps = | 80 | deps = |
75 | -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} | 81 | -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} |
76 | -r{toxinidir}/requirements.txt | 82 | -r{toxinidir}/requirements.txt |
@@ -83,6 +89,7 @@ commands = | |||
83 | whitelist_externals = rm | 89 | whitelist_externals = rm |
84 | 90 | ||
85 | [testenv:cover] | 91 | [testenv:cover] |
92 | basepython = python3 | ||
86 | setenv = | 93 | setenv = |
87 | {[testenv]setenv} | 94 | {[testenv]setenv} |
88 | PYTHON=coverage run --source manila --parallel-mode | 95 | PYTHON=coverage run --source manila --parallel-mode |
@@ -109,6 +116,7 @@ deps = -r{toxinidir}/requirements.txt | |||
109 | commands = python tools/lintstack.py check | 116 | commands = python tools/lintstack.py check |
110 | 117 | ||
111 | [testenv:api-ref] | 118 | [testenv:api-ref] |
119 | basepython = python3 | ||
112 | # This environment is called from CI scripts to test and publish | 120 | # This environment is called from CI scripts to test and publish |
113 | # the API Ref to developer.openstack.org. | 121 | # the API Ref to developer.openstack.org. |
114 | whitelist_externals = rm | 122 | whitelist_externals = rm |
@@ -117,6 +125,7 @@ commands = | |||
117 | sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html | 125 | sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html |
118 | 126 | ||
119 | [testenv:dbrevision] | 127 | [testenv:dbrevision] |
128 | basepython = python3 | ||
120 | deps = -r{toxinidir}/requirements.txt | 129 | deps = -r{toxinidir}/requirements.txt |
121 | commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs} | 130 | commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs} |
122 | 131 | ||