From 178638e13d0ead43694e052972ca64360457b6fa Mon Sep 17 00:00:00 2001 From: Prasad Mukhedkar Date: Tue, 23 Mar 2021 11:30:19 +0100 Subject: [PATCH] Set TEST_REPO_URL as per the execution mode This commit adds logic to set TEST_REPO_URL as per the execution mode. Signed-off-by: Prasad Mukhedkar Change-Id: I7c8b1542fa003ea0e2cf98b7e2f1de5193cd4047 --- jjb/cloud-infra/scripts/xtesting-healthcheck.sh | 8 +++++++- jjb/cloud-infra/scripts/xtesting-infra-healthcheck.sh | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/jjb/cloud-infra/scripts/xtesting-healthcheck.sh b/jjb/cloud-infra/scripts/xtesting-healthcheck.sh index b480989b..5b63fa26 100755 --- a/jjb/cloud-infra/scripts/xtesting-healthcheck.sh +++ b/jjb/cloud-infra/scripts/xtesting-healthcheck.sh @@ -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 diff --git a/jjb/cloud-infra/scripts/xtesting-infra-healthcheck.sh b/jjb/cloud-infra/scripts/xtesting-infra-healthcheck.sh index b480989b..5b63fa26 100755 --- a/jjb/cloud-infra/scripts/xtesting-infra-healthcheck.sh +++ b/jjb/cloud-infra/scripts/xtesting-infra-healthcheck.sh @@ -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 -- 2.25.1