From 87df9d6cac95112560e5c652a68b74a28f4a6785 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 24 Nov 2020 07:39:56 -0700 Subject: 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 --- tox.ini | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tox.ini') 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" -- cgit v1.2.3