From: Jonathan Rajotte Date: Fri, 15 Dec 2017 20:56:26 +0000 (-0500) Subject: Fix: use temp dir for base venv X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=62f05720140793e7f79c702eda016152b7bd7651;p=lttng-ci.git Fix: use temp dir for base venv Tox have difficulty with long base venv python path on standalone node. Do not use -e from bash to make sure all cleanup command are run. Signed-off-by: Jonathan Rajotte --- diff --git a/scripts/lttng-ivc/build.sh b/scripts/lttng-ivc/build.sh index 0214648..8cc08ac 100644 --- a/scripts/lttng-ivc/build.sh +++ b/scripts/lttng-ivc/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash -exu +#!/bin/bash -xu # # Copyright (C) 2017 - Jonathan Rajotte-Julien # @@ -26,12 +26,9 @@ export LD_LIBRARY_PATH="$URCU_LIBS:${LD_LIBRARY_PATH:-}" export CPPFLAGS="${CPPFLAGS:-} -I$URCU_INCS" export LDFLAGS="${LDFLAGS:-} -L$URCU_LIBS" -PYENV_HOME=$WORKSPACE/.pyenv/ +# Tox does not support long path venv for whatever reason. +PYENV_HOME=$(mktemp -d) -# Delete previously built virtualenv if any -if [ -d "$PYENV_HOME" ]; then - rm -rf "$PYENV_HOME" -fi # Create virtualenv and install necessary packages virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME" @@ -49,9 +46,10 @@ export TOXWORKDIR cd src/ # Run test suite via tox -set +e tox -v -- --junit-xml="${WORKSPACE}/result.xml" -set -e + +# Remove base venv +rm -rf "$PYENV_HOME" # Save cp -r "$TOXWORKDIR" "${WORKSPACE}/artifacts"