RFR: JDK-8170576 Silence error message in compare.sh when selecting images

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Dec 1 08:31:28 UTC 2016


If compare.sh does not find any images, as the last test it will look 
for licensee-src, using $(ls .../*/...). If this does not match any 
directories, ls will write an error message to stderr which will leak 
through.

Bug: https://bugs.openjdk.java.net/browse/JDK-8170576
Patch inline:
diff --git a/common/bin/compare.sh b/common/bin/compare.sh
--- a/common/bin/compare.sh
+++ b/common/bin/compare.sh
@@ -1295,8 +1295,8 @@
          OTHER_JDK="$OTHER/images/jdk"
          OTHER_JRE="$OTHER/images/jre"
          echo "Selecting jdk images for compare"
-    elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk)" ] \
-        && [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk)" ]
+    elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk 2> 
/dev/null)" ] \
+        && [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk 2> 
/dev/null)" ]
      then
          echo "Selecting licensee images for compare"
          # Simply override the THIS and OTHER dir with the build dir from

/Magnus




More information about the build-dev mailing list