summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2020-11-24 07:39:56 -0700
committerGitHub <noreply@github.com>2020-11-24 09:39:56 -0500
commit87df9d6cac95112560e5c652a68b74a28f4a6785 (patch)
tree9ae8e202f9e42d6dbd5de249b36e57a2a24aae0a
parent6e86d2a5649b3a9113923c73154ebf02224732a6 (diff)
downloadcloud-init-git-87df9d6cac95112560e5c652a68b74a28f4a6785.tar.gz
tox: avoid tox testenv subsvars for xenial support (#684)
Xenial tox 2.3.1 still suffers from https://github.com/tox-dev/tox/issues/208. As a result we cannot use testenv substvars if we want to support running tox on xenial systems. Drop the {[testenv:integration-tests]*} substitutions to avoid tracebacks when running `tox -e xenial-dev` which has the signature: "No support for the %s substitution type" % sub_type) tox.ConfigError: ConfigError: No support for the posargs substitution type
-rw-r--r--tox.ini13
1 files changed, 10 insertions, 3 deletions
diff --git a/tox.ini b/tox.ini
index 30b11398..022b918d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -139,6 +139,12 @@ passenv = HOME TRAVIS
deps =
-r{toxinidir}/cloud-tests-requirements.txt
+# Until Xenial tox support is dropped or bumps to tox:2.3.2, reflect changes to
+# deps into testenv:integration-tests-ci: commands, passenv and deps.
+# This is due to (https://github.com/tox-dev/tox/issues/208) which means that
+# the {posargs} handling and substitutions won't do what we want until tox 2.3.2
+# Once Xenial is dropped, integration-tests-ci can use proper substitution
+# commands = {[testenv:integration-tests]commands}
[testenv:integration-tests]
basepython = python3
commands = {envpython} -m pytest --log-cli-level=INFO {posargs:tests/integration_tests}
@@ -147,9 +153,10 @@ deps =
-r{toxinidir}/integration-requirements.txt
[testenv:integration-tests-ci]
-commands = {[testenv:integration-tests]commands}
-passenv = {[testenv:integration-tests]passenv}
-deps = {[testenv:integration-tests]deps}
+commands = {envpython} -m pytest --log-cli-level=INFO {posargs:tests/integration_tests}
+passenv = CLOUD_INIT_*
+deps =
+ -r{toxinidir}/integration-requirements.txt
setenv =
PYTEST_ADDOPTS="-m ci"