From 753c30f1e0eb5def8aa3ec62513f83fe88a28953 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 27 Oct 2023 12:19:17 +0900 Subject: [PATCH] diskimage-create: Fix tox.ini not compatible with tox 4.x Change-Id: I24e1a7059c7ed1bdfe0f287c81148db912ce52a9 --- diskimage-create/tox.ini | 43 ++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/diskimage-create/tox.ini b/diskimage-create/tox.ini index 1d1c75828e..e6eba7f4b4 100644 --- a/diskimage-create/tox.ini +++ b/diskimage-create/tox.ini @@ -1,36 +1,53 @@ [tox] -minversion = 1.8 +minversion = 3.18 envlist = bashate,docs,build,test -skipsdist = True [testenv] basepython = python3 envdir = {toxworkdir}/venv setenv = VIRTUAL_ENV={envdir} -passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY DIB_* CLOUD_INIT_DATASOURCES OCTAVIA_REPO_PATH +passenv = + http_proxy + HTTP_PROXY + https_proxy + HTTPS_PROXY + no_proxy + NO_PROXY + DIB_* + CLOUD_INIT_DATASOURCES + OCTAVIA_REPO_PATH install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -whitelist_externals = virt-filesystems - virt-inspector - awk - mkdir - rm +allowlist_externals = + virt-filesystems + virt-inspector + awk + mkdir + rm [testenv:docs] commands = doc8 README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst [testenv:bashate] -commands = bashate diskimage-create.sh - bashate image-tests.sh +commands = + bashate diskimage-create.sh + bashate image-tests.sh [testenv:build] # NOTE: specify cache directory explicitly with -c as the `diskimage-create.sh` # default is based off of `$HOME` which is not passed on in a `tox` environment. -commands = ./diskimage-create.sh -o {toxinidir}/amphora-x64-haproxy -w {toxworkdir} -c {toxworkdir}/.cache +commands = + ./diskimage-create.sh -o {toxinidir}/amphora-x64-haproxy -w {toxworkdir} -c {toxworkdir}/.cache +allowlist_externals = + ./diskimage-create.sh + [testenv:test] # Work around tox limitations with command pipes # https://bitbucket.org/hpk42/tox/issue/73/pipe-output-of-command-into-file -commands = ./image-tests.sh {toxinidir}/.amp_tox_test - rm -rf {toxinidir}/.amp_tox_test +commands = + ./image-tests.sh {toxinidir}/.amp_tox_test + rm -rf {toxinidir}/.amp_tox_test +allowlist_externals = + ./image-tests.sh