X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-deploy-controller-verify.sh;h=863ba3ae8439671eb5d97e157e512192b69a21b1;hb=5a6ea423022e8d3e663097d510513dde2a56b7e9;hp=de1aee3643217159459e40ebcbed00a39eb13b6f;hpb=e0aefe5070de96457096e34e8fbf8f6a67f57f94;p=releng%2Fbuilder.git diff --git a/jjb/integration/include-raw-integration-deploy-controller-verify.sh b/jjb/integration/include-raw-integration-deploy-controller-verify.sh index de1aee364..863ba3ae8 100644 --- a/jjb/integration/include-raw-integration-deploy-controller-verify.sh +++ b/jjb/integration/include-raw-integration-deploy-controller-verify.sh @@ -35,7 +35,19 @@ netstat -natu echo "redirected karaf console output to karaf_console.log" export KARAF_REDIRECT=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log -echo "JDK Version ..." +if [ ${JDKVERSION} == 'openjdk8' ]; then + echo "Setting the JRE Version to 8" + # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start. + # sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java + export JAVA_HOME=/usr/lib/jvm/java-1.8.0 +elif [ ${JDKVERSION} == 'openjdk7' ]; then + echo "Setting the JRE Version to 7" + # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start. + # sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java + export JAVA_HOME=/usr/lib/jvm/java-1.7.0 +fi +readlink -e "${JAVA_HOME}/bin/java" +echo "Default JDK Version, JAVA_HOME should override" java -version echo "Starting controller..." @@ -76,8 +88,10 @@ function exit_on_log_file_message { echo "looking for \"$1\" in karaf.log file" if grep --quiet "$1" ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log; then echo ABORTING: found "$1" - echo "Dumping first 1M of karaf.log..." - tail --bytes=1M ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log + echo "Dumping first 500K bytes of karaf log..." + head --bytes=500K ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log + echo "Dumping last 500K bytes of karaf log..." + tail --bytes=500K ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log cp ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log . cp ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log . exit 1 @@ -86,8 +100,10 @@ function exit_on_log_file_message { echo "looking for \"$1\" in karaf_console.log file" if grep --quiet "$1" ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log; then echo ABORTING: found "$1" - echo "Dumping first 1M of karaf_console.log..." - tail --bytes=1M ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log + echo "Dumping first 500K bytes of karaf log..." + head --bytes=500K ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log + echo "Dumping last 500K bytes of karaf log..." + tail --bytes=500K ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log cp ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log . cp ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log . exit 1 @@ -104,5 +120,16 @@ cp ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log . echo "Kill controller" ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh -# vim: ts=4 sw=4 sts=4 et ft=sh : +echo "Detecting misplaced config files" +pushd "${WORKSPACE}/${BUNDLEFOLDER}" +XMLS_FOUND=`echo *.xml` +popd +if [ "$XMLS_FOUND" != "*.xml" ]; then + echo "Bug 4628 confirmed." + ## TODO: Uncomment the following when ODL is fixed, to guard against regression. + # exit 1 +else + echo "Bug 4628 not detected." +fi +# vim: ts=4 sw=4 sts=4 et ft=sh :