test/jdk/tools/pack200/Utils.java
changeset 50603 95c0644a1c47
parent 47216 71c04702a3d5
--- a/test/jdk/tools/pack200/Utils.java	Sat Jun 16 10:10:54 2018 +0100
+++ b/test/jdk/tools/pack200/Utils.java	Fri Jun 15 17:34:01 2018 -0700
@@ -497,6 +497,10 @@
     }
 
     static List<String> runExec(List<String> cmdsList, Map<String, String> penv) {
+        return runExec(cmdsList, penv, false);
+    }
+
+    static List<String> runExec(List<String> cmdsList, Map<String, String> penv, boolean ignoreReturnValue) {
         ArrayList<String> alist = new ArrayList<String>();
         ProcessBuilder pb =
                 new ProcessBuilder(cmdsList);
@@ -529,7 +533,7 @@
                 in = rd.readLine();
             }
             retval = p.waitFor();
-            if (retval != 0) {
+            if (!ignoreReturnValue && retval != 0) {
                 throw new RuntimeException("process failed with non-zero exit");
             }
         } catch (Exception ex) {