mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8136930: Simplify use of module-system options by custom launchers
8160489: Multiple -Xpatch lines ignored by javac 8156998: javac should support new option -XinheritRuntimeEnvironment Reviewed-by: jlahoda, ksrini
This commit is contained in:
parent
3b80559162
commit
978417c4c7
161 changed files with 2421 additions and 1050 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
/*
|
||||
* @test
|
||||
* @summary Tests jdeps -m and -mp options on named modules and unnamed modules
|
||||
* @summary Tests jdeps -m and --module-path options on named modules and unnamed modules
|
||||
* @library ../lib
|
||||
* @build CompilerUtils JdepsUtil
|
||||
* @modules jdk.jdeps/com.sun.tools.jdeps
|
||||
|
@ -68,12 +68,12 @@ public class ModuleTest {
|
|||
CompilerUtils.cleanDir(UNNAMED_DIR);
|
||||
|
||||
assertTrue(CompilerUtils.compileModule(SRC_DIR, MODS_DIR, UNSUPPORTED,
|
||||
"-XaddExports:java.base/jdk.internal.perf=" + UNSUPPORTED));
|
||||
"--add-exports", "java.base/jdk.internal.perf=" + UNSUPPORTED));
|
||||
// m4 is not referenced
|
||||
Arrays.asList("m1", "m2", "m3", "m4")
|
||||
.forEach(mn -> assertTrue(CompilerUtils.compileModule(SRC_DIR, MODS_DIR, mn)));
|
||||
|
||||
assertTrue(CompilerUtils.compile(SRC_DIR.resolve("m3"), UNNAMED_DIR, "-mp", MODS_DIR.toString()));
|
||||
assertTrue(CompilerUtils.compile(SRC_DIR.resolve("m3"), UNNAMED_DIR, "-p", MODS_DIR.toString()));
|
||||
Files.delete(UNNAMED_DIR.resolve("module-info.class"));
|
||||
}
|
||||
|
||||
|
@ -112,10 +112,10 @@ public class ModuleTest {
|
|||
|
||||
@Test(dataProvider = "modules")
|
||||
public void modularTest(String name, ModuleMetaData data) throws IOException {
|
||||
// jdeps -modulepath mods -m <name>
|
||||
// jdeps --module-path mods -m <name>
|
||||
runTest(data, MODS_DIR.toString(), Set.of(name));
|
||||
|
||||
// jdeps -modulepath libs/m1.jar:.... -m <name>
|
||||
// jdeps --module-path libs/m1.jar:.... -m <name>
|
||||
String mp = Arrays.stream(modules)
|
||||
.filter(mn -> !mn.equals(name))
|
||||
.map(mn -> MODS_DIR.resolve(mn).toString())
|
||||
|
@ -150,8 +150,8 @@ public class ModuleTest {
|
|||
Set<String> roots, Path... paths)
|
||||
throws IOException
|
||||
{
|
||||
// jdeps -modulepath <modulepath> -m root paths
|
||||
String cmd = String.format("jdeps -modulepath %s -addmods %s %s%n",
|
||||
// jdeps --module-path <modulepath> -m root paths
|
||||
String cmd = String.format("jdeps --module-path %s --add-modules %s %s%n",
|
||||
MODS_DIR, roots.stream().collect(Collectors.joining(",")), paths);
|
||||
|
||||
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue