X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=csit%2Frun-csit.sh;h=25f5f6a77aad9ecfe4cadf5b2ae1dba58d4069c4;hb=cdea746f714607e309342507345afd9e497972a7;hp=52ec2186305390e3e4aa2649be80f6c351fa95b3;hpb=d6578881eae5c7fb6f0731fad382b05ab2a4f8a6;p=cps.git diff --git a/csit/run-csit.sh b/csit/run-csit.sh index 52ec21863..25f5f6a77 100755 --- a/csit/run-csit.sh +++ b/csit/run-csit.sh @@ -20,10 +20,22 @@ # Branched from ccsdk/distribution to this repository Feb 23, 2021 +WORKDIR=$(mktemp -d --suffix=-robot-workdir) + # # functions # +# 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 +119,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 +158,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=