diff --git a/tox.ini b/tox.ini index 0544c3f..73dec7e 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,7 @@ commands = ostestr {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:cover] +basepython = python3 commands = {toxinidir}/tools/cover.sh {posargs} [testenv:debug-py27] @@ -27,6 +28,7 @@ basepython = python3.5 commands = oslo_debug_helper -t sahara/tests/unit {posargs} [testenv:pep8] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -42,9 +44,11 @@ commands = bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file tools/config/sahara-policy-generator.conf [testenv:venv] +basepython = python3 commands = {posargs} [testenv:images] @@ -52,6 +56,7 @@ sitepackages = True commands = {posargs} [testenv:docs] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/doc/requirements.txt @@ -65,6 +70,7 @@ commands = whitelist_externals = rm [testenv:api-ref] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/doc/requirements.txt @@ -76,15 +82,18 @@ whitelist_externals = rm [testenv:pylint] +basepython = python3 setenv = VIRTUAL_ENV={envdir} commands = bash tools/lintstack.sh [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file tools/config/config-generator.sahara.conf \ --output-file etc/sahara/sahara.conf.sample [testenv:releasenotes] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/doc/requirements.txt @@ -94,6 +103,7 @@ commands = whitelist_externals = rm [testenv:debug] +basepython = python3 # It runs tests from the specified dir (default is sahara/tests) # in interactive mode, so, you could use pbr for tests debug. # Example usage: tox -e debug -- -t sahara/tests/unit some.test.path @@ -101,6 +111,7 @@ whitelist_externals = rm commands = oslo_debug_helper -t sahara/tests/unit {posargs} [testenv:bandit] +basepython = python3 deps = -r{toxinidir}/test-requirements-bandit.txt commands = bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests @@ -120,6 +131,7 @@ import_exceptions = sahara.i18n local-check-factory = sahara.utils.hacking.checks.factory [testenv:bindep] +basepython = python3 # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed