+# relax set options so the sourced file will not fail
+# the responsibility is shifted to the sourced file...
+function relax_set() {
+ set +e
+ set +o pipefail
+}
+
+# load the saved set options
+function load_set() {
+ _setopts="$-"
+
+ # bash shellopts
+ for i in $(echo "$SHELLOPTS" | tr ':' ' ') ; do
+ set +o ${i}
+ done
+ for i in $(echo "$RUN_CSIT_SHELLOPTS" | tr ':' ' ') ; do
+ set -o ${i}
+ done
+
+ # other options
+ for i in $(echo "$_setopts" | sed 's/./& /g') ; do
+ set +${i}
+ done
+ set -${RUN_CSIT_SAVE_SET}
+}
+
+# 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"
+