X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=csit%2Frun-csit.sh;h=6703160a37f2e71443b42cd746e6fe8f794c7dc1;hb=897686f96f49dc4405eb3e29f2a6218dc8040c97;hp=52ec2186305390e3e4aa2649be80f6c351fa95b3;hpb=02a89e4739beb90b57da45661fe1c738929694d7;p=cps.git diff --git a/csit/run-csit.sh b/csit/run-csit.sh index 52ec21863..6703160a3 100755 --- a/csit/run-csit.sh +++ b/csit/run-csit.sh @@ -20,10 +20,24 @@ # Branched from ccsdk/distribution to this repository Feb 23, 2021 +WORKDIR=$(mktemp -d --suffix=-robot-workdir) + # # functions # +echo "---> run-csit.sh" + +# wrapper for sourcing a file +function source_safely() { + [ -z "$1" ] && return 1 + relax_set + . "$1" + load_set +} +# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh +source_safely "${ROBOT3_VENV}/bin/activate" + function on_exit(){ rc=$? if [[ ${WORKSPACE} ]]; then @@ -107,14 +121,6 @@ function relax_set() { set +o pipefail } -# wrapper for sourcing a file -function source_safely() { - [ -z "$1" ] && return 1 - relax_set - . "$1" - load_set -} - # # main # @@ -154,14 +160,11 @@ TESTPLANDIR="${WORKSPACE}/${TESTPLAN}" # Run installation of prerequired libraries source_safely "${WORKSPACE}/prepare-csit.sh" -# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh -source_safely "${ROBOT_VENV}/bin/activate" - -WORKDIR=$(mktemp -d --suffix=-robot-workdir) +# Use robot framework working directory cd "${WORKDIR}" # Add csit scripts to PATH -export PATH="${PATH}:${WORKSPACE}/docker/scripts:${WORKSPACE}/scripts:${ROBOT_VENV}/bin" +export PATH="${PATH}:${WORKSPACE}/docker/scripts:${WORKSPACE}/scripts:${ROBOT3_VENV}/bin" export SCRIPTS="${WORKSPACE}/scripts" export ROBOT_VARIABLES=