Merge "Update build timeout for docker image to 60m"
[releng/builder.git] / jjb / integration / integration-deploy-controller-run-test.sh
index 7e3a7beb6b3ae297e445d39a50d4bfea3a5f3636..ecba48eec1066707a5bd4a4051d63d6d1dcd4702 100644 (file)
@@ -54,7 +54,15 @@ echo "Configuring the startup features..."
 FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
 CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties
 sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" \${FEATURESCONF}
-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,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features%g" \${FEATURESCONF}
+
+FEATURE_INDEX_STRING="features-integration-index"
+FEATURE_TEST_STRING="features-integration-test"
+if [[ "$KARAF_VERSION" == "karaf4" ]]; then
+    FEATURE_INDEX_STRING="features-index"
+    FEATURE_TEST_STRING="features-test"
+fi
+
+sed -ie "s%mvn:org.opendaylight.integration/\${FEATURE_INDEX_STRING}/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/\${FEATURE_INDEX_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features%g" \${FEATURESCONF}
 cat \${FEATURESCONF}
 
 if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then
@@ -69,6 +77,19 @@ sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupInde
 # FIXME: Make log size limit configurable from build parameter.
 sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=30GB/g' \${LOGCONF}
 echo "log4j.logger.org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver = WARN" >> \${LOGCONF}
+# Add custom logging levels
+# CONTROLLERDEBUGMAP is expected to be a key:value map of space separated values like "module:level module2:level2"
+# where module is abbreviated and does not include org.opendaylight
+unset IFS
+if [ -n "${CONTROLLERDEBUGMAP}" ]; then
+    for kv in ${CONTROLLERDEBUGMAP}; do
+        module=\${kv%%:*}
+        level=\${kv#*:}
+        if [ -n \${module} ] && [ -n \${level} ]; then
+            echo "log4j.logger.org.opendaylight.\${module} = \${level}" >> \${LOGCONF}
+        fi
+    done
+fi
 cat \${LOGCONF}
 
 echo "Configure java home and max memory..."