Merge "Increase ocata packer timeout from 60m to 75m"
[releng/builder.git] / jjb / integration / distribution / distribution-check-bootup.sh
index d4ffea9cdd3bcff8939ddbbbdddb799aa92269f9..2a333dea772f553e762e41d85cdced555f814f81 100644 (file)
@@ -20,10 +20,13 @@ unzip -q "${BUNDLE}"
 
 echo "Configuring the startup features..."
 FEATURESCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg"
-# Add test feature repo if Karaf 4.
-sed -ie "s%mvn:org.opendaylight.integration/features-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-test/${BUNDLEVERSION}/xml/features%g" "${FEATURESCONF}"
-# Add test feature repo if Karaf 3.
-sed -ie "s%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-integration-test/${BUNDLEVERSION}/xml/features%g" "${FEATURESCONF}"
+FEATURE_TEST_STRING="features-integration-test"
+if [[ "$KARAF_VERSION" == "karaf4" ]]; then
+    FEATURE_TEST_STRING="features-test"
+fi
+
+sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,%g" ${FEATURESCONF}
+
 # Add actual boot features.
 sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" "${FEATURESCONF}"
 cat "${FEATURESCONF}"
@@ -43,6 +46,7 @@ netstat -pnatu
 
 echo "redirected karaf console output to karaf_console.log"
 export KARAF_REDIRECT="${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log"
+mkdir -p ${WORKSPACE}/${BUNDLEFOLDER}/data/log
 
 if [ "${JDKVERSION}" == 'openjdk8' ]; then
     echo "Setting the JRE Version to 8"
@@ -61,6 +65,7 @@ java -version
 
 echo "Redirecting karaf console output to karaf_console.log"
 export KARAF_REDIRECT="${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log"
+mkdir -p ${WORKSPACE}/${BUNDLEFOLDER}/data/log
 
 echo "Starting controller..."
 ${WORKSPACE}/${BUNDLEFOLDER}/bin/start
@@ -151,9 +156,9 @@ echo "Kill controller"
 ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
 
 echo "Bug 4628: Detecting misplaced config files"
-pushd "${WORKSPACE}/${BUNDLEFOLDER}"
+pushd "${WORKSPACE}/${BUNDLEFOLDER}" || exit
 XMLS_FOUND="$(echo *.xml)"
-popd
+popd || exit
 if [ "$XMLS_FOUND" != "*.xml" ]; then
     echo "Bug 4628 confirmed."
     ## TODO: Uncomment the following when ODL is fixed, to guard against regression.