< prev index next >

test/tools/launcher/modules/patch/basic/PatchTest.java

Print this page

        

@@ -32,10 +32,11 @@
 
 import java.io.File;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Arrays;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import static jdk.testlibrary.ProcessTools.*;
 

@@ -135,22 +136,20 @@
     {
         // the argument to the test is the list of classes overridden or added
         String arg = Stream.of(CLASSES).collect(Collectors.joining(","));
 
         int exitValue
-            =  executeTestJava("-Xpatch:java.base=" + basePatches,
+            = executeModularTest("test", "jdk.test.Main",
+                  Arrays.asList("-Xpatch:java.base=" + basePatches,
                                "-Xpatch:jdk.naming.dns=" + dnsPatches,
                                "-Xpatch:jdk.compiler=" + compilerPatches,
                                "-XaddExports:java.base/java.lang2=test",
                                "-XaddExports:jdk.naming.dns/com.sun.jndi.dns=test",
                                "-XaddExports:jdk.naming.dns/com.sun.jndi.dns2=test",
-                               "-XaddExports:jdk.compiler/com.sun.tools.javac2=test",
-                               "-addmods", "jdk.naming.dns,jdk.compiler",
-                               "-mp", MODS_DIR.toString(),
-                               "-m", "test/jdk.test.Main", arg)
-                .outputTo(System.out)
-                .errorTo(System.out)
+                                "-XaddExports:jdk.compiler/com.sun.tools.javac2=test"),
+                  null, Arrays.asList(MODS_DIR), Arrays.asList("jdk.naming.dns", "jdk.compiler"),
+                  arg)
                 .getExitValue();
 
         assertTrue(exitValue == 0);
     }
 
< prev index next >