X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-start-cluster-run-test.sh;h=64b261854152c26baa8d49dcce06d4783c98f4b5;hb=fb8aea9c9c29651f761019b325dee04957b3d293;hp=8a548b938df0ffd7f8982873f0f36ccf6e6464ed;hpb=07568191388cf45a9525d473a9d59df7c177e78e;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-start-cluster-run-test.sh b/jjb/integration/integration-start-cluster-run-test.sh index 8a548b938..64b261854 100644 --- a/jjb/integration/integration-start-cluster-run-test.sh +++ b/jjb/integration/integration-start-cluster-run-test.sh @@ -4,6 +4,9 @@ # script. # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091 source ${ROBOT_VENV}/bin/activate +source /tmp/common-functions.sh ${BUNDLEFOLDER} +# Ensure we fail the job if any steps fail. +set -ex -o pipefail echo "#################################################" echo "## Verify Cluster is UP ##" @@ -92,7 +95,7 @@ do ssh ${!CONTROLLERIP} "sudo ps aux" > ${WORKSPACE}/ps_before.log pid=$(grep org.apache.karaf.main.Main ${WORKSPACE}/ps_before.log | grep -v grep | tr -s ' ' | cut -f2 -d' ') echo "karaf main: org.apache.karaf.main.Main, pid:${pid}" - ssh ${!CONTROLLERIP} "jstack ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_before.log || true + ssh ${!CONTROLLERIP} "${JAVA_HOME}/bin/jstack -l ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_before.log || true done echo "Generating mininet variables..." @@ -102,35 +105,10 @@ do tools_variables=${tools_variables}" -v ${MININETIP}:${!MININETIP}" done -echo "Locating test plan to use..." -testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}" -if [ ! -f "${testplan_filepath}" ]; then - testplan_filepath="${WORKSPACE}/test/csit/testplans/${TESTPLAN}" -fi - -echo "Changing the testplan path..." -cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt -cat testplan.txt - -# Use the testplan if specific SUITES are not defined. -if [ -z "${SUITES}" ]; then - SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '` -else - newsuites="" - workpath="${WORKSPACE}/test/csit/suites" - for suite in ${SUITES}; do - fullsuite="${workpath}/${suite}" - if [ -z "${newsuites}" ]; then - newsuites+=${fullsuite} - else - newsuites+=" "${fullsuite} - fi - done - SUITES=${newsuites} -fi +get_test_suites SUITES echo "Starting Robot test suites ${SUITES} ..." -pybot -N ${TESTPLAN} \ +robot -N ${TESTPLAN} \ --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \ -v BUNDLEFOLDER:${BUNDLEFOLDER} \ -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \ @@ -175,7 +153,7 @@ do ssh ${!CONTROLLERIP} "sudo ps aux" > ${WORKSPACE}/ps_after.log pid=$(grep org.apache.karaf.main.Main ${WORKSPACE}/ps_after.log | grep -v grep | tr -s ' ' | cut -f2 -d' ') echo "karaf main: org.apache.karaf.main.Main, pid:${pid}" - ssh ${!CONTROLLERIP} "jstack ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_after.log || true + ssh ${!CONTROLLERIP} "${JAVA_HOME}/bin/jstack -l ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_after.log || true echo "killing karaf process..." ssh "${!CONTROLLERIP}" bash -c 'ps axf | grep karaf | grep -v grep | awk '"'"'{print "kill -9 " $1}'"'"' | sh' done