aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Watkins <mwatkins@linuxfoundation.org>2022-11-23 14:31:40 +0000
committerMatthew Watkins <mwatkins@linuxfoundation.org>2022-11-23 14:34:04 +0000
commitfdaccbf398d84b7b19a95e11c017b5c6d2019ffe (patch)
tree6fd9c474a968652681eca7544ab23522c9db31b1
parent77de212a9c4af21a2a2439750ad3f136f5e4ae60 (diff)
Fix: Call source_safely after function declaration
Issue-ID: RELENG-4523 Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org> Change-Id: Id74b1f24655a83f68b5f28c9eab68bb069f0bc74
-rwxr-xr-xcsit/run-csit.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/csit/run-csit.sh b/csit/run-csit.sh
index aefcc8539f..25f5f6a77a 100755
--- a/csit/run-csit.sh
+++ b/csit/run-csit.sh
@@ -20,15 +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)
#
# 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
@@ -112,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
#