From: John Mulligan Date: Tue, 19 Mar 2024 17:28:53 +0000 (-0400) Subject: script: allow use of run_tox.sh with default tox envlist X-Git-Tag: v20.0.0~2282^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00584a5619ba1c20d0c017f7326c8e9bd376e324;p=ceph.git script: allow use of run_tox.sh with default tox envlist Add a "magic" --tox-envs value to force the run_tox.sh script to defer to the tox.ini file's envlist rather than specifying a custom env list. Pass `--tox-envs __tox_defaults__` to the script to use whatever the tox.ini defaults are. Adding a magic value like this avoids the need to make breaking changes (or any changes) to the current cmake "code" used to invoke the tox tests from make check. It's a little hacky but the funny looking value should make it clear that it's special. In particular it avoids adding new conditionals to the cmake files. Signed-off-by: John Mulligan --- diff --git a/src/script/run_tox.sh b/src/script/run_tox.sh index 9d45d8b9246c..f2f71a60f292 100755 --- a/src/script/run_tox.sh +++ b/src/script/run_tox.sh @@ -125,7 +125,11 @@ function main() { export CEPH_BUILD_DIR=$build_dir # use the wheelhouse prepared by install-deps.sh export PIP_FIND_LINKS="$tox_path/wheelhouse" - tox -c $tox_path/tox.ini -e "$tox_envs" "$@" + tox_cmd=(tox -c $tox_path/tox.ini) + if [ "$tox_envs" != "__tox_defaults__" ]; then + tox_cmd+=("-e" "$tox_envs") + fi + "${tox_cmd[@]}" "$@" } main "$@"