tox: use Python 3 where possible
Time to say goodbye for Python 2 Depends-On: https://review.opendev.org/693356 Change-Id: I5f23da932df70bf17d09d42420ac408221d0e02f
This commit is contained in:
@@ -14,7 +14,7 @@ gpgcheck=1
|
|||||||
gpgkey=$DOCKER_REPOS_MIRROR_URL/centos/gpg
|
gpgkey=$DOCKER_REPOS_MIRROR_URL/centos/gpg
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo yum -y install docker-ce
|
sudo yum -y install docker-ce python3
|
||||||
|
|
||||||
# Disable SELinux
|
# Disable SELinux
|
||||||
setenforce 0
|
setenforce 0
|
||||||
|
|||||||
23
tox.ini
23
tox.ini
@@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.5.0
|
minversion = 2.5.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = pep8,py27,py37,pypy
|
envlist = pep8,py37,pypy
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop=True
|
usedevelop=True
|
||||||
whitelist_externals = find
|
whitelist_externals = find
|
||||||
rm
|
rm
|
||||||
@@ -20,11 +21,22 @@ commands =
|
|||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
|
[testenv:py27]
|
||||||
|
basepython = python2.7
|
||||||
|
|
||||||
|
[testenv:py36]
|
||||||
|
basepython = python3.6
|
||||||
|
|
||||||
|
[testenv:py37]
|
||||||
|
basepython = python3.7
|
||||||
|
|
||||||
|
[testenv:pypy]
|
||||||
|
basepython = pypy
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
commands = oslo_debug_helper -t kolla/tests {posargs}
|
commands = oslo_debug_helper -t kolla/tests {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
NOSE_WITH_COVERAGE=1
|
NOSE_WITH_COVERAGE=1
|
||||||
NOSE_COVER_BRANCHES=1
|
NOSE_COVER_BRANCHES=1
|
||||||
@@ -39,7 +51,6 @@ commands =
|
|||||||
coverage report --show-missing
|
coverage report --show-missing
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
yamllint
|
yamllint
|
||||||
@@ -56,7 +67,6 @@ commands =
|
|||||||
commands = bandit --skip B303 -r docker kolla tests tools
|
commands = bandit --skip B303 -r docker kolla tests tools
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
@@ -64,7 +74,6 @@ deps =
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
@@ -76,7 +85,6 @@ commands =
|
|||||||
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
|
||||||
whitelist_externals = make
|
whitelist_externals = make
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
commands =
|
commands =
|
||||||
@@ -149,14 +157,12 @@ commands=
|
|||||||
oslo-config-generator --config-file etc/oslo-config-generator/kolla-build.conf
|
oslo-config-generator --config-file etc/oslo-config-generator/kolla-build.conf
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:bindep]
|
[testenv:bindep]
|
||||||
basepython = python3
|
|
||||||
# Do not install any requirements. We want this to be fast and work even if
|
# 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
|
# system dependencies are missing, since it's used to tell you what system
|
||||||
# dependencies are missing! This also means that bindep must be installed
|
# dependencies are missing! This also means that bindep must be installed
|
||||||
@@ -173,7 +179,6 @@ exclude=.eggs,.git,.tox,doc
|
|||||||
local-check-factory = kolla.hacking.checks.factory
|
local-check-factory = kolla.hacking.checks.factory
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{toxinidir}/lower-constraints.txt
|
-c{toxinidir}/lower-constraints.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user