summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcaoyuan <cao.yuan@99cloud.net>2019-12-22 23:43:10 +0800
committercaoyuan <cao.yuan@99cloud.net>2020-01-06 14:28:33 +0000
commit286559f626067c67e875d259efa2b9ab9e9a9a07 (patch)
tree10d1eb06d22699df094bc540575b5aef3c7a7e2c
parent69d93720161b9ad3db09d6bb351d83ccfaf4e429 (diff)
downloadoslo-rootwrap-286559f626067c67e875d259efa2b9ab9e9a9a07.tar.gz
tox: Trivial cleanup
1. refactor basepython to testenv 2. remove py27 target 3. fix a bug that prevented usage of upper constraints in some test envs Change-Id: I5fcec1c7ec978f9fb279de8ac9aae227e6ec5e9d
-rw-r--r--tox.ini26
1 files changed, 11 insertions, 15 deletions
diff --git a/tox.ini b/tox.ini
index 53ab2b5..92e31f3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,9 +1,10 @@
[tox]
-minversion = 2.0
-envlist = py27,py37,pep8
+minversion = 3.1
+envlist = py37,pep8
+ignore_basepython_conflict = True
[testenv]
-install_command = pip install {opts} {packages}
+basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@@ -15,12 +16,9 @@ commands =
stestr run --slowest (?!tests.test_functional_eventlet)tests {posargs}
env TEST_EVENTLET=1 stestr run --slowest tests.test_functional_eventlet
-[testenv:py27]
-basepython = python2.7
-
[testenv:pep8]
-basepython = python3
deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
commands =
flake8
@@ -28,7 +26,6 @@ commands =
bandit -r oslo_rootwrap tests -n5 --skip B404
[testenv:cover]
-basepython = python3
deps = {[testenv]deps}
coverage
setenv =
@@ -40,13 +37,13 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:venv]
-basepython = python3
commands = {posargs}
[testenv:docs]
-basepython = python3
whitelist_externals = rm
-deps = -r{toxinidir}/doc/requirements.txt
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html
@@ -63,19 +60,18 @@ basepython = python2.7
commands = python benchmark/benchmark.py
[testenv:benchmark3]
-basepython = python3
commands = python3 benchmark/benchmark.py
[testenv:releasenotes]
-basepython = python3
whitelist_externals = rm
-deps = -r{toxinidir}/doc/requirements.txt
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt