aboutsummaryrefslogtreecommitdiffstats
path: root/csit/run-csit.sh
diff options
context:
space:
mode:
authorAlexander Dehn <alexander.dehn@highstreet-technologies.com>2022-04-28 16:14:09 +0000
committerAlexander Dehn <alexander.dehn@highstreet-technologies.com>2022-04-28 16:43:53 +0000
commit9d8ae6d68ea8427052ec45326e22f3a2ea7ed081 (patch)
treeaa20199a924275a7b48eb508001bc143385bc7d7 /csit/run-csit.sh
parent427fac36830315046ac811cadde056fabb8c60f9 (diff)
Refactore SDNC/R robot test suite for K-Release
add improvements SDNC ready state detection Issue-ID: SDNC-1682 Signed-off-by: Alexander Dehn <alexander.dehn@highstreet-technologies.com> Change-Id: I6b9829b5187f9c27ff9c2fab6b9a7381ce563b25 Former-commit-id: 83da3b4380d992d5891ed8e35b305358db9af4ff
Diffstat (limited to 'csit/run-csit.sh')
-rwxr-xr-xcsit/run-csit.sh33
1 files changed, 22 insertions, 11 deletions
diff --git a/csit/run-csit.sh b/csit/run-csit.sh
index 32b0fa54..c4c4ab71 100755
--- a/csit/run-csit.sh
+++ b/csit/run-csit.sh
@@ -199,18 +199,29 @@ echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ${SUITES} ..."
relax_set
-# Runs an alternative robotframework setup as docker image in $ROBOT_IMAGE
-# test suites will be executed within this docker container
-# and results are stored as usual
-if [[ -z $ROBOT_IMAGE ]]; then
- echo "*** TRACE **** python is $(which python) [version $(python --version)]"
- env
- python -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
+if [[ -z $SDNC_RELEASE_WITHOUT_ROBOT ]] ; then
+ if [[ -z $SDNC_READY_STATE_TIME_OUT ]] ; then
+ # Runs an alternative robotframework setup as docker image in $ROBOT_IMAGE
+ # test suites will be executed within this docker container
+ # and results are stored as usual
+ if [[ -z $ROBOT_IMAGE ]]; then
+ echo "*** TRACE **** python is $(which python) [version $(python --version)]"
+ env
+ python -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
+ else
+ echo "*** TRACE **** python is running in a container"
+ docker run --net="host" \
+ -v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE \
+ python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
+ fi
+ else
+ echo "[INFO] Skip Robot test suite, because SDNC is not in ready state"
+ echo "[ERROR] SDNC is not in ready state, check karaf.log!"
+ false
+ fi
else
- echo "*** TRACE **** python is running in a container"
- docker run --net="host" \
- -v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE \
- python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
+ echo "[WARNING] Robot test suite is skipped, but job remains ok. "
+ true
fi
RESULT=$?
load_set