From: Thanh Ha Date: Tue, 27 Aug 2019 22:13:38 +0000 (-0400) Subject: Remove detox in favor of tox --parallel X-Git-Tag: v0.43.0~12^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=1873622e1b5bf98150db6850901d190dd6c35422;p=releng%2Fglobal-jjb.git Remove detox in favor of tox --parallel Tox officially supports parallel mode as of Tox 3.7 so drop the usage of detox. Set parallel mode to 'auto' which will run as many threads as available CPUs. Signed-off-by: Thanh Ha Change-Id: Id59ad10ed9b521a5c0ca3fef3e7e15053c2dc32c --- diff --git a/shell/python-tools-install.sh b/shell/python-tools-install.sh index a4bec330..c7686535 100644 --- a/shell/python-tools-install.sh +++ b/shell/python-tools-install.sh @@ -50,7 +50,7 @@ python-openstackclient~=3.16.0 dogpile.cache~=0.6.8 # Version 0.7.[01] seems to break openstackclient more-itertools~=5.0.0 niet~=1.4.2 # Extract values from yaml -tox~=3.5.0 +tox>=3.7.0. # Tox 3.7 or greater is necessary for parallel mode support yq~=2.7.2 EOF diff --git a/shell/tox-install.sh b/shell/tox-install.sh index ad983362..4708e88c 100644 --- a/shell/tox-install.sh +++ b/shell/tox-install.sh @@ -15,7 +15,7 @@ echo "---> tox-install.sh" set -e -o pipefail # Tox version is pulled in through detox to mitigate version conflict -python -m pip install --user --quiet --upgrade argparse detox tox-pyenv +python -m pip install --user --quiet --upgrade tox-pyenv echo "----> pip freeze" pip freeze diff --git a/shell/tox-run.sh b/shell/tox-run.sh index 90bd5465..c1598917 100644 --- a/shell/tox-run.sh +++ b/shell/tox-run.sh @@ -34,15 +34,15 @@ set +e # Allow detox to fail so that we can collect the logs in the next step PARALLEL="${PARALLEL:-true}" if [ "${PARALLEL}" = true ]; then if [ -n "$TOX_ENVS" ]; then - detox -e "$TOX_ENVS" | tee -a "$ARCHIVE_TOX_DIR/detox.log" + tox -e "$TOX_ENVS" --parallel auto --parallel-live | tee -a "$ARCHIVE_TOX_DIR/tox.log" tox_status="${PIPESTATUS[0]}" else - detox | tee -a "$ARCHIVE_TOX_DIR/detox.log" + tox --parallel auto --parallel-live | tee -a "$ARCHIVE_TOX_DIR/tox.log" tox_status="${PIPESTATUS[0]}" fi else if [ -n "$TOX_ENVS" ]; then - tox -e "$TOX_ENVS" | tee -a "$ARCHIVE_TOX_DIR/tox.log" + tox -e "$TOX_ENVS" | tee -a "$ARCHIVE_TOX_DIR/tox.log" tox_status="${PIPESTATUS[0]}" else tox | tee -a "$ARCHIVE_TOX_DIR/tox.log"