Set TEST_REPO_URL as per the execution mode 60/8060/1
authorPrasad Mukhedkar <prasad.mukhedkar@est.tech>
Tue, 23 Mar 2021 10:30:19 +0000 (11:30 +0100)
committerPrasad Mukhedkar <prasad.mukhedkar@est.tech>
Tue, 23 Mar 2021 10:31:51 +0000 (11:31 +0100)
This commit adds logic to set TEST_REPO_URL as per the execution mode.

Signed-off-by: Prasad Mukhedkar <prasad.mukhedkar@est.tech>
Change-Id: I7c8b1542fa003ea0e2cf98b7e2f1de5193cd4047

jjb/cloud-infra/scripts/xtesting-healthcheck.sh
jjb/cloud-infra/scripts/xtesting-infra-healthcheck.sh

index b480989bb35718803b3b8889d4046170b9d83963..5b63fa26b68d1596595af990f6d16aa373e3a96e 100755 (executable)
@@ -24,12 +24,18 @@ set -o pipefail
 # NOTE (eprasad) we need to override execution mode variable to mode supported by test framework
 export EXECUTION_MODE=$(echo "$EXECUTION_MODE" | sed 's/deployment/test/g')
 
+if [[ "$EXECUTION_MODE" == "offline-test" ]]; then
+  TEST_ROOT_DIR="/opt/test/offline/git/test"
+else
+  TEST_ROOT_DIR="$WORKSPACE"
+fi
+
 echo "Info  : Cloning infra/test repository"
 cd $HOME && /bin/rm -rf $WORKSPACE
 git clone -q $TEST_REPO_URL $WORKSPACE
 
 
-cd $WORKSPACE/test
+cd "$TEST_ROOT_DIR/test"
 ./test.sh -s "$STACK_TYPE" -b "$BRANCH" -c "$DEPLOY_SCENARIO" -f "$TEST_FW" -t "$TEST_SUITE" \
     -o /tmp/openrc -i /tmp/inventory.ini -y -v
 
index b480989bb35718803b3b8889d4046170b9d83963..5b63fa26b68d1596595af990f6d16aa373e3a96e 100755 (executable)
@@ -24,12 +24,18 @@ set -o pipefail
 # NOTE (eprasad) we need to override execution mode variable to mode supported by test framework
 export EXECUTION_MODE=$(echo "$EXECUTION_MODE" | sed 's/deployment/test/g')
 
+if [[ "$EXECUTION_MODE" == "offline-test" ]]; then
+  TEST_ROOT_DIR="/opt/test/offline/git/test"
+else
+  TEST_ROOT_DIR="$WORKSPACE"
+fi
+
 echo "Info  : Cloning infra/test repository"
 cd $HOME && /bin/rm -rf $WORKSPACE
 git clone -q $TEST_REPO_URL $WORKSPACE
 
 
-cd $WORKSPACE/test
+cd "$TEST_ROOT_DIR/test"
 ./test.sh -s "$STACK_TYPE" -b "$BRANCH" -c "$DEPLOY_SCENARIO" -f "$TEST_FW" -t "$TEST_SUITE" \
     -o /tmp/openrc -i /tmp/inventory.ini -y -v