X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-deploy-controller-run-test.sh;h=78bdec2fed423388c2bc16e9e6f3f43e51b043a7;hb=90621e6b3a8ef8334d6891a51a9599fdd9f10024;hp=536458cf7a67166b15beffb2596260d34e3fb0ba;hpb=b7dbc6354499bf74708bcf12baed515d6ee61d3b;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 536458cf7..78bdec2fe 100644 --- a/jjb/integration/include-raw-integration-deploy-controller-run-test.sh +++ b/jjb/integration/include-raw-integration-deploy-controller-run-test.sh @@ -9,8 +9,10 @@ CONTROLLERMEM="2048m" if [ ${CONTROLLERSCOPE} == 'all' ]; then ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}" CONTROLLERMEM="3072m" + COOLDOWN_PERIOD="180" else ACTUALFEATURES="${CONTROLLERFEATURES}" + COOLDOWN_PERIOD="60" fi # Some versions of jenkins job builder result in feature list containing spaces # and ending in newline. Remove all that. @@ -29,19 +31,6 @@ fi cat > ${WORKSPACE}/controller-script.sh <> \${CUSTOMPROP} +fi +cat \${CUSTOMPROP} + echo "Configuring the log..." LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' \${LOGCONF} @@ -64,17 +59,27 @@ sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupInde sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=100GB/g' \${LOGCONF} cat \${LOGCONF} -echo "Configure max memory..." +echo "Configure java home and max memory..." MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv +sed -ie 's%^# export JAVA_HOME%export JAVA_HOME="\${JAVA_HOME:-${JAVA_HOME}}"%g' \${MEMCONF} sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF} cat \${MEMCONF} echo "Listing all open ports on controller system..." netstat -natu -echo "JDK Version ..." +echo "Set Java version" +sudo /usr/sbin/alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 1 +sudo /usr/sbin/alternatives --set java ${JAVA_HOME}/bin/java +echo "JDK default version ..." java -version +echo "Set JAVA_HOME" +export JAVA_HOME="$JAVA_HOME" +# Did you know that in HERE documents, single quote is an ordinary character, but backticks are still executing? +JAVA_RESOLVED=\`readlink -e "\${JAVA_HOME}/bin/java"\` +echo "Java binary pointed at by JAVA_HOME: \${JAVA_RESOLVED}" + echo "Starting controller..." /tmp/${BUNDLEFOLDER}/bin/start @@ -102,8 +107,8 @@ while true; do fi done -echo "Cool down for 1 min :)..." -sleep 60 +echo "Cool down for ${COOLDOWN_PERIOD} seconds :)..." +sleep ${COOLDOWN_PERIOD} echo "Listing all open ports on controller system..." netstat -natu @@ -128,22 +133,33 @@ EOF scp ${WORKSPACE}/controller-script.sh ${ODL_SYSTEM_IP}:/tmp ssh ${ODL_SYSTEM_IP} 'bash /tmp/controller-script.sh' +if [ ${NUM_OPENSTACK_SYSTEM} -gt 0 ]; then + echo "Exiting without running tests to deploy openstack for testing" + exit +fi + +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 ${WORKSPACE}/test/csit/testplans/${TESTPLAN} | sed "s:integration:${WORKSPACE}:" > testplan.txt +cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt 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 -v BUNDLEFOLDER:${BUNDLEFOLDER} -v WORKSPACE:/tmp \ --v NEXUSURL_PREFIX:${NEXUSURL_PREFIX} \ +-v JAVA_HOME:${JAVA_HOME} -v BUNDLE_URL:${ACTUALBUNDLEURL} -v NEXUSURL_PREFIX:${NEXUSURL_PREFIX} \ -v CONTROLLER:${ODL_SYSTEM_IP} -v ODL_SYSTEM_IP:${ODL_SYSTEM_IP} -v CONTROLLER_USER:${USER} -v ODL_SYSTEM_USER:${USER} \ -v TOOLS_SYSTEM_IP:${TOOLS_SYSTEM_IP} -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} -v TOOLS_SYSTEM_3_IP:${TOOLS_SYSTEM_3_IP} \ -v TOOLS_SYSTEM_4_IP:${TOOLS_SYSTEM_4_IP} -v TOOLS_SYSTEM_5_IP:${TOOLS_SYSTEM_5_IP} -v TOOLS_SYSTEM_6_IP:${TOOLS_SYSTEM_6_IP} \ --v TOOLS_SYSTEM_USER:${USER} \ +-v TOOLS_SYSTEM_USER:${USER} -v JDKVERSION:${JDKVERSION} -v ODL_STREAM:${DISTROSTREAM} \ -v MININET:${TOOLS_SYSTEM_IP} -v MININET1:${TOOLS_SYSTEM_2_IP} -v MININET2:${TOOLS_SYSTEM_3_IP} \ -v MININET3:${TOOLS_SYSTEM_4_IP} -v MININET4:${TOOLS_SYSTEM_5_IP} -v MININET5:${TOOLS_SYSTEM_6_IP} \ -v MININET_USER:${USER} -v USER_HOME:${HOME} ${TESTOPTIONS} ${SUITES} || true +# FIXME: Sort (at least -v) options alphabetically. echo "Killing ODL and fetching Karaf log..." set +e # We do not want to create red dot just because something went wrong while fetching logs.