X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-deploy-controller-run-test.sh;h=60e6d02219d770bea584a1c4740e32e40e7431f9;hb=d57b2ef5112c3ace6834b58340e16338ea21758c;hp=fc5f6d7c7223f8c47f78ab0dc838cf6ca016a74a;hpb=b1778c91dcc04d8cc5d927a5d31959bb80365355;p=releng%2Fbuilder.git diff --git a/jjb/integration/include-raw-integration-deploy-controller-run-test.sh b/jjb/integration/include-raw-integration-deploy-controller-run-test.sh index fc5f6d7c7..60e6d0221 100644 --- a/jjb/integration/include-raw-integration-deploy-controller-run-test.sh +++ b/jjb/integration/include-raw-integration-deploy-controller-run-test.sh @@ -7,28 +7,34 @@ if [ ${CONTROLLERSCOPE} == 'all' ]; then CONTROLLERMEM="3072m" fi +NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org} + if [ ${BUNDLEURL} == 'last' ]; then - NEXUSPATH="https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}" + NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}" # Extract the BUNDLEVERSION from the pom.xml BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null` - echo "Bundle version is $BUNDLEVERSION" + echo "Bundle version is ${BUNDLEVERSION}" # Acquire the timestamp information from maven-metadata.xml wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml TIMESTAMP=`xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null` - echo "Nexus timestamp is $TIMESTAMP" + echo "Nexus timestamp is ${TIMESTAMP}" BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}" BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip" BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" - echo "Distribution bundle URL is ${BUNDLEURL}" else - BUNDLE="$(echo "$BUNDLEURL" | awk -F '/' '{ print $(NF) }')" - BUNDLEFOLDER="${BUNDLE//.zip}" + BUNDLE="${BUNDLEURL##*/}" + BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))" + BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}" fi +echo "Distribution bundle URL is ${BUNDLEURL}" +echo "Distribution bundle is ${BUNDLE}" +echo "Distribution folder is ${BUNDLEFOLDER}" + cat > ${WORKSPACE}/controller-script.sh < "600" )); then echo Timeout Controller DOWN - echo "Fetching Karaf log" - scp ${CONTROLLER0}:/tmp/${BUNDLEFOLDER}/data/log/karaf.log . + echo "Dumping Karaf log..." + cd ../data/log + cat karaf.log exit 1 else COUNT=\$(( \${COUNT} + 5 )) @@ -81,11 +88,11 @@ echo "Cool down for 1 min :)..." sleep 60 echo "Checking OSGi bundles..." -./client 'bundle:list' +sshpass -p karaf ./client -u karaf 'bundle:list' EOF -scp ${WORKSPACE}/controller-script.sh $CONTROLLER0:/tmp +scp ${WORKSPACE}/controller-script.sh ${CONTROLLER0}:/tmp ssh ${CONTROLLER0} 'bash /tmp/controller-script.sh' echo "Changing the testplan path..." @@ -95,7 +102,7 @@ cat testplan.txt SUITES=$( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' ' ) echo "Starting Robot test suites ${SUITES} ..." -pybot -N ${TESTPLAN} -c critical -e exclude --loglevel TRACE -v BUNDLEFOLDER:${BUNDLEFOLDER} -v WORKSPACE:/tmp -v CONTROLLER:${CONTROLLER0} -v MININET:${MININET0} -v MININET_USER:${USER} -v USER_HOME:${HOME} ${TESTOPTIONS} ${SUITES} +pybot -N ${TESTPLAN} -c critical -e exclude -v BUNDLEFOLDER:${BUNDLEFOLDER} -v WORKSPACE:/tmp -v CONTROLLER:${CONTROLLER0} -v MININET:${MININET0} -v MININET_USER:${USER} -v USER_HOME:${HOME} -v NEXUSURL_PREFIX:${NEXUSURL_PREFIX} ${TESTOPTIONS} ${SUITES} echo "Fetching Karaf log" scp ${CONTROLLER0}:/tmp/${BUNDLEFOLDER}/data/log/karaf.log .