X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-ivc%2Fbuild.sh;h=c008944bf11a5985fc2d67088d812a1eb6473ca0;hb=b2f18af4604f35660d9162f65f87e8d59f35e8ea;hp=0214648865babded3ae6c97e8857701cf63db1a1;hpb=c497a33456db8606961394b6b7952fc8dc156fb8;p=lttng-ci.git diff --git a/scripts/lttng-ivc/build.sh b/scripts/lttng-ivc/build.sh index 0214648..c008944 100644 --- a/scripts/lttng-ivc/build.sh +++ b/scripts/lttng-ivc/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash -exu +#!/bin/bash # # Copyright (C) 2017 - Jonathan Rajotte-Julien # @@ -15,23 +15,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -PYTHON3="python3" -P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])") - -URCU_INCS=${WORKSPACE}/deps/liburcu/build/include -URCU_LIBS=${WORKSPACE}/deps/liburcu/build/lib - -# Get liburcu setup -export LD_LIBRARY_PATH="$URCU_LIBS:${LD_LIBRARY_PATH:-}" -export CPPFLAGS="${CPPFLAGS:-} -I$URCU_INCS" -export LDFLAGS="${LDFLAGS:-} -L$URCU_LIBS" +set -xu -PYENV_HOME=$WORKSPACE/.pyenv/ +PYTHON3="python3" +P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))') -# Delete previously built virtualenv if any -if [ -d "$PYENV_HOME" ]; then - rm -rf "$PYENV_HOME" -fi +# Tox does not support long path venv for whatever reason. +PYENV_HOME=$(mktemp -d) # Create virtualenv and install necessary packages virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME" @@ -49,9 +39,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"