summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-14 15:45:01 +0000
committerGerrit Code Review <review@openstack.org>2018-06-14 15:45:02 +0000
commit06817266dfdaa70508c82697546b7671865ad0bc (patch)
treec6a6fe88478e4635c78715b734da87c396e7ba16
parente1cef0ea518c29d7375dfc9487d1591f1176e6ad (diff)
parent5542de51bc2205ee297fb94539ff5ab4d0b73109 (diff)
Merge "Be explicit about tox python version"
-rw-r--r--tox.ini18
1 files changed, 17 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index fce211f..f04e4ae 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,6 @@ skipsdist = True
4envlist = py35,py27,compliance,pep8 4envlist = py35,py27,compliance,pep8
5 5
6[testenv] 6[testenv]
7basepython = python3
8setenv = VIRTUAL_ENV={envdir} 7setenv = VIRTUAL_ENV={envdir}
9 PYTHONWARNINGS=default::DeprecationWarning 8 PYTHONWARNINGS=default::DeprecationWarning
10 OS_STDOUT_CAPTURE=1 9 OS_STDOUT_CAPTURE=1
@@ -31,6 +30,7 @@ whitelist_externals =
31passenv = *_proxy *_PROXY 30passenv = *_proxy *_PROXY
32 31
33[testenv:api-ref] 32[testenv:api-ref]
33basepython = python3
34whitelist_externals = rm 34whitelist_externals = rm
35deps = 35deps =
36 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} 36 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@@ -40,6 +40,7 @@ commands =
40 sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/ 40 sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/
41 41
42[testenv:releasenotes] 42[testenv:releasenotes]
43basepython = python3
43deps = 44deps =
44 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} 45 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
45 -r{toxinidir}/requirements.txt 46 -r{toxinidir}/requirements.txt
@@ -61,10 +62,12 @@ setenv =
61 {[testenv:functional]setenv} 62 {[testenv:functional]setenv}
62 63
63[testenv:compliance] 64[testenv:compliance]
65basepython = python3
64setenv = 66setenv =
65 OS_TEST_PATH = ./cinder/tests/compliance 67 OS_TEST_PATH = ./cinder/tests/compliance
66 68
67[testenv:pep8] 69[testenv:pep8]
70basepython = python3
68commands = 71commands =
69 python setup.py check --restructuredtext --strict 72 python setup.py check --restructuredtext --strict
70 flake8 {posargs} . 73 flake8 {posargs} .
@@ -72,12 +75,14 @@ commands =
72 {toxinidir}/tools/check_exec.py {toxinidir}/cinder {toxinidir}/doc/source/ {toxinidir}/releasenotes/notes 75 {toxinidir}/tools/check_exec.py {toxinidir}/cinder {toxinidir}/doc/source/ {toxinidir}/releasenotes/notes
73 76
74[testenv:fast8] 77[testenv:fast8]
78basepython = python3
75# Use same environment directory as pep8 env to save space and install time 79# Use same environment directory as pep8 env to save space and install time
76envdir = {toxworkdir}/pep8 80envdir = {toxworkdir}/pep8
77commands = 81commands =
78 {toxinidir}/tools/fast8.sh 82 {toxinidir}/tools/fast8.sh
79 83
80[testenv:pylint] 84[testenv:pylint]
85basepython = python3
81deps = -r{toxinidir}/requirements.txt 86deps = -r{toxinidir}/requirements.txt
82 pylint==1.9.1 87 pylint==1.9.1
83commands = bash tools/lintstack.sh 88commands = bash tools/lintstack.sh
@@ -85,6 +90,7 @@ commands = bash tools/lintstack.sh
85[testenv:cover] 90[testenv:cover]
86# Also do not run test_coverage_ext tests while gathering coverage as those 91# Also do not run test_coverage_ext tests while gathering coverage as those
87# tests conflict with coverage. 92# tests conflict with coverage.
93basepython = python3
88setenv = 94setenv =
89 {[testenv]setenv} 95 {[testenv]setenv}
90 PYTHON=coverage run --source cinder --parallel-mode 96 PYTHON=coverage run --source cinder --parallel-mode
@@ -95,23 +101,28 @@ commands =
95 coverage xml -o cover/coverage.xml 101 coverage xml -o cover/coverage.xml
96 102
97[testenv:genconfig] 103[testenv:genconfig]
104basepython = python3
98sitepackages = False 105sitepackages = False
99envdir = {toxworkdir}/pep8 106envdir = {toxworkdir}/pep8
100commands = oslo-config-generator --config-file=tools/config/cinder-config-generator.conf 107commands = oslo-config-generator --config-file=tools/config/cinder-config-generator.conf
101 108
102 109
103[testenv:genpolicy] 110[testenv:genpolicy]
111basepython = python3
104commands = oslopolicy-sample-generator --config-file=tools/config/cinder-policy-generator.conf 112commands = oslopolicy-sample-generator --config-file=tools/config/cinder-policy-generator.conf
105 113
106[testenv:genopts] 114[testenv:genopts]
115basepython = python3
107sitepackages = False 116sitepackages = False
108envdir = {toxworkdir}/pep8 117envdir = {toxworkdir}/pep8
109commands = python tools/config/generate_cinder_opts.py 118commands = python tools/config/generate_cinder_opts.py
110 119
111[testenv:venv] 120[testenv:venv]
121basepython = python3
112commands = {posargs} 122commands = {posargs}
113 123
114[testenv:docs] 124[testenv:docs]
125basepython = python3
115deps = 126deps =
116 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} 127 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
117 -r{toxinidir}/requirements.txt 128 -r{toxinidir}/requirements.txt
@@ -125,15 +136,18 @@ commands =
125whitelist_externals = rm 136whitelist_externals = rm
126 137
127[testenv:gendriverlist] 138[testenv:gendriverlist]
139basepython = python3
128sitepackages = False 140sitepackages = False
129envdir = {toxworkdir}/venv 141envdir = {toxworkdir}/venv
130commands = python {toxinidir}/tools/generate_driver_list.py 142commands = python {toxinidir}/tools/generate_driver_list.py
131 143
132[testenv:bandit] 144[testenv:bandit]
145basepython = python3
133deps = -r{toxinidir}/test-requirements.txt 146deps = -r{toxinidir}/test-requirements.txt
134commands = bandit -r cinder -n5 -x tests -ll 147commands = bandit -r cinder -n5 -x tests -ll
135 148
136[testenv:bandit-baseline] 149[testenv:bandit-baseline]
150basepython = python3
137envdir = {toxworkdir}/bandit 151envdir = {toxworkdir}/bandit
138commands = bandit-baseline -r cinder -n5 -x tests -ii -ll 152commands = bandit-baseline -r cinder -n5 -x tests -ii -ll
139 153
@@ -144,6 +158,7 @@ commands = bandit-baseline -r cinder -n5 -x tests -ii -ll
144# separately, outside of the requirements files, and develop mode disabled 158# separately, outside of the requirements files, and develop mode disabled
145# explicitly to avoid unnecessarily installing the checked-out repo too (this 159# explicitly to avoid unnecessarily installing the checked-out repo too (this
146# further relies on "tox.skipsdist = True" above). 160# further relies on "tox.skipsdist = True" above).
161basepython = python3
147deps = bindep 162deps = bindep
148commands = bindep test 163commands = bindep test
149usedevelop = False 164usedevelop = False
@@ -164,6 +179,7 @@ local-check-factory = cinder.hacking.checks.factory
164import_exceptions = cinder.i18n 179import_exceptions = cinder.i18n
165 180
166[testenv:lower-constraints] 181[testenv:lower-constraints]
182basepython = python3
167deps = 183deps =
168 -c{toxinidir}/lower-constraints.txt 184 -c{toxinidir}/lower-constraints.txt
169 -r{toxinidir}/test-requirements.txt 185 -r{toxinidir}/test-requirements.txt