changeset 44238:a81138486a91

8172457: JarDirTest.java fails after recent change Reviewed-by: iveresov
author iignatyev
date Sun, 05 Mar 2017 22:25:52 -0800
parents e22e0d071bf9
children fdd97dc2367b
files hotspot/test/ProblemList.txt hotspot/test/testlibrary_tests/ctw/CtwTest.java
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/test/ProblemList.txt	Thu Mar 02 17:46:59 2017 +0100
+++ b/hotspot/test/ProblemList.txt	Sun Mar 05 22:25:52 2017 -0800
@@ -79,7 +79,5 @@
 
 # :hotspot_misc
 
-testlibrary_tests/ctw/JarDirTest.java 8172457 windows-all
-
 #############################################################################
 
--- a/hotspot/test/testlibrary_tests/ctw/CtwTest.java	Thu Mar 02 17:46:59 2017 +0100
+++ b/hotspot/test/testlibrary_tests/ctw/CtwTest.java	Sun Mar 05 22:25:52 2017 -0800
@@ -37,6 +37,7 @@
 import java.nio.file.StandardCopyOption;
 import java.nio.charset.Charset;
 
+import jdk.test.lib.Platform;
 import jdk.test.lib.JDKToolFinder;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
@@ -93,7 +94,12 @@
         // concat CTW_COMMAND and args w/o 0th element
         String[] cmd = Arrays.copyOf(CTW_COMMAND, CTW_COMMAND.length + args.length - 1);
         System.arraycopy(args, 1, cmd, CTW_COMMAND.length, args.length - 1);
-
+        if (Platform.isWindows()) {
+            // '*' has to be escaped on windows
+            for (int i = 0; i < cmd.length; ++i) {
+                cmd[i] = cmd[i].replace("*", "\"*\"");
+            }
+        }
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmd);
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         dump(output, "compile");