X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=csit%2Frun-csit.sh;h=25f5f6a77aad9ecfe4cadf5b2ae1dba58d4069c4;hb=94d77dd3430bf504b1fe1209760cfeedb47752a7;hp=f291e341836c1c92d6a92da19617a27568ba8d8f;hpb=46d6e4fddd4c2a955c685f006f76053205cfc4ec;p=cps.git diff --git a/csit/run-csit.sh b/csit/run-csit.sh index f291e3418..25f5f6a77 100755 --- a/csit/run-csit.sh +++ b/csit/run-csit.sh @@ -20,16 +20,22 @@ # Branched from ccsdk/distribution to this repository Feb 23, 2021 -# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh -source_safely "${ROBOT3_VENV}/bin/activate" - WORKDIR=$(mktemp -d --suffix=-robot-workdir) -cd "${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 @@ -113,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 # @@ -160,6 +158,9 @@ TESTPLANDIR="${WORKSPACE}/${TESTPLAN}" # Run installation of prerequired libraries source_safely "${WORKSPACE}/prepare-csit.sh" +# Use robot framework working directory +cd "${WORKDIR}" + # Add csit scripts to PATH export PATH="${PATH}:${WORKSPACE}/docker/scripts:${WORKSPACE}/scripts:${ROBOT3_VENV}/bin" export SCRIPTS="${WORKSPACE}/scripts"