aboutsummaryrefslogtreecommitdiffstats
path: root/run-csit.sh
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-09-27 11:31:33 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-09-27 12:18:06 -0700
commit13111e94c63f26b3234ae28ff46df3ce8392636d (patch)
treea096f2d49dc381e2b282aad9dbbd9d5ff161eabd /run-csit.sh
parent9abb61ca2cea1907cab2cec312d6dca6e53a93cd (diff)
Adjust relative paths for CSIT files
Remove leading test/csit/ from all relative paths to accomodate the move into integration/csit repo. Change-Id: Id9482b46df839f5eba28135e9f987a3eda1d7d94 Issue-ID: INT-671 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'run-csit.sh')
-rwxr-xr-xrun-csit.sh24
1 files changed, 11 insertions, 13 deletions
diff --git a/run-csit.sh b/run-csit.sh
index 40cd9ee6..9b744dbd 100755
--- a/run-csit.sh
+++ b/run-csit.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
#
# Copyright 2016-2017 Huawei Technologies Co., Ltd.
#
@@ -60,10 +60,10 @@ fi
rm -rf $WORKSPACE/archives
mkdir -p $WORKSPACE/archives
-if [ -f ${WORKSPACE}/test/csit/${1}/testplan.txt ]; then
+if [ -f ${WORKSPACE}/${1}/testplan.txt ]; then
export TESTPLAN="${1}"
else
- echo "testplan not found: ${WORKSPACE}/test/csit/${TESTPLAN}/testplan.txt"
+ echo "testplan not found: ${WORKSPACE}/${TESTPLAN}/testplan.txt"
exit 2
fi
@@ -71,7 +71,7 @@ fi
export TESTOPTIONS="${2}"
if [ -z "$3" ]; then
- CI=${WORKSPACE}/../ci-management
+ CI=${WORKSPACE}/../../ci-management
else
CI=${3}
fi
@@ -79,18 +79,16 @@ fi
-TESTPLANDIR=${WORKSPACE}/test/csit/${TESTPLAN}
+TESTPLANDIR=${WORKSPACE}/${TESTPLAN}
# Assume that if ROBOT_VENV is set, we don't need to reinstall robot
if [ -f ${WORKSPACE}/env.properties ]; then
source ${WORKSPACE}/env.properties
- source ${ROBOT_VENV}/bin/activate
fi
-if ! type pybot > /dev/null; then
- rm -f ${WORKSPACE}/env.properties
- source $CI/jjb/integration/include-raw-integration-install-robotframework.sh
- source ${WORKSPACE}/env.properties
+if [ -f ${ROBOT_VENV}/bin/activate ]; then
source ${ROBOT_VENV}/bin/activate
+else
+ source $CI/jjb/integration/include-raw-integration-install-robotframework.sh
fi
# install required Robot libraries
@@ -124,8 +122,8 @@ set -x
# Add csit scripts to PATH
-export PATH=${PATH}:${WORKSPACE}/test/csit/docker/scripts:${WORKSPACE}/test/csit/scripts:${ROBOT_VENV}/bin
-export SCRIPTS=${WORKSPACE}/test/csit/scripts
+export PATH=${PATH}:${WORKSPACE}/docker/scripts:${WORKSPACE}/scripts:${ROBOT_VENV}/bin
+export SCRIPTS=${WORKSPACE}/scripts
export ROBOT_VARIABLES=
# Sign in to nexus3 docker repo
@@ -145,7 +143,7 @@ docker_stats | tee $WORKSPACE/archives/_sysinfo-1-after-setup.txt
# Run test plan
cd $WORKDIR
echo "Reading the testplan:"
-cat ${TESTPLANDIR}/testplan.txt | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${WORKSPACE}/test/csit/tests/|" > testplan.txt
+cat ${TESTPLANDIR}/testplan.txt | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${WORKSPACE}/tests/|" > testplan.txt
cat testplan.txt
SUITES=$( xargs -a testplan.txt )