Bug 779944 - Jenkins compile script can fail to validate shell features (r=dschaffe)
authorBrent Baker <brbaker@adobe.com>
Fri, 03 Aug 2012 04:57:38 -0700
changeset 7519 38d673ef94d4085b32033390f247ba7534a50fe6
parent 7518 f0a40cb503020850d2f52e43b13f1fa7d63bdb3e
child 7520 c8432b486b2d3f5d30c947adc329087f3633ec4a
push id4254
push userdschaffe@adobe.com
push dateFri, 03 Aug 2012 15:34:49 +0000
reviewersdschaffe
bugs779944, 1096255
Bug 779944 - Jenkins compile script can fail to validate shell features (r=dschaffe) CL@1096255
build/buildbot/slaves/all/compile-generic.sh
--- a/build/buildbot/slaves/all/compile-generic.sh
+++ b/build/buildbot/slaves/all/compile-generic.sh
@@ -188,51 +188,55 @@ echo ""
 echo "*******************************************************************************"
 echo "shell compiled with these features:"
 avmfeatures=`$shellpath/$shellname -Dversion | grep AVM | sed 's/\;/ /g' | sed 's/features //g'`
 for i in ${avmfeatures}; do
     echo $i
 done
 echo ""
 failbuild=0
-for i in ${features}; do
-    feature_ok=0
-    if [[ $i == +* ]]; then
-        echo "Make sure that ${i:1} is enabled"
-        for feat in ${avmfeatures}; do
-            if [ "$feat" == "${i:1}" ]; then
-                feature_ok=1
-                break
+# bz: 779944, only run feature validation if shell can be executed natively
+if [[ "$avmfeatures" != "" ]]; then
+    for i in ${features}; do
+        feature_ok=0
+        if [[ $i == +* ]]; then
+            echo "Make sure that ${i:1} is enabled"
+            for feat in ${avmfeatures}; do
+                if [ "$feat" == "${i:1}" ]; then
+                    feature_ok=1
+                    break
+                fi
+            done
+            if [ $feature_ok != 1 ]; then
+                echo "---> FAIL"
+                failbuild=1
+            else
+                echo "---> PASS"
             fi
-        done
-        if [ $feature_ok != 1 ]; then
-            echo "---> FAIL"
-            failbuild=1
-        else
-            echo "---> PASS"
         fi
-    fi
-    if [[ $i == -* ]]; then
-        feature_ok=1
-        echo "Make sure that ${i:1} is NOT enabled"
-        for feat in ${avmfeatures}; do
-            if [ "$feat" == "${i:1}" ]; then
-                feature_ok=0
-                break
+        if [[ $i == -* ]]; then
+            feature_ok=1
+            echo "Make sure that ${i:1} is NOT enabled"
+            for feat in ${avmfeatures}; do
+                if [ "$feat" == "${i:1}" ]; then
+                    feature_ok=0
+                    break
+                fi
+            done
+            if [ $feature_ok == 0 ]; then
+                echo "---> FAIL"
+                failbuild=1
+            else
+                echo "---> PASS"
             fi
-        done
-        if [ $feature_ok == 0 ]; then
-            echo "---> FAIL"
-            failbuild=1
-        else
-            echo "---> PASS"
         fi
-    fi
-    echo ""
-done
+        echo ""
+    done
+fi
+
 if [ $failbuild == 1 ]; then
     echo "message: feature check FAILED"
     cd $basedir/core
     mv avmplusVersion.h.orig avmplusVersion.h
     # Remove the binary since we have determined that it is NOT valid
     rm $shellpath/$shellname
     endSilent
     exit 1