mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -21,7 +21,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
import com.sun.tools.javadoc.Main;
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
|
@ -29,6 +29,8 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.sun.tools.javadoc.Main;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8086737
|
||||
|
@ -52,16 +54,16 @@ public class ReleaseOption {
|
|||
List<String> options = new ArrayList<>();
|
||||
options.addAll(Arrays.asList(args));
|
||||
options.add("-XDrawDiagnostics");
|
||||
options.add(System.getProperty("test.src", ".") + java.io.File.separatorChar + "ReleaseOptionSource.java");
|
||||
options.add(new File(System.getProperty("test.src", "."), "ReleaseOptionSource.java").getPath());
|
||||
StringWriter out = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(out);
|
||||
int actualResult = Main.execute("javadoc", pw, pw, pw, "com.sun.tools.doclets.formats.html.HtmlDoclet", options.toArray(new String[0]));
|
||||
System.err.println("actual result=" + actualResult);
|
||||
System.err.println("actual output=" + out.toString());
|
||||
if (actualResult != expectedResult)
|
||||
throw new Error();
|
||||
throw new Error("Exit code not as expected");
|
||||
if (!validate.test(out.toString())) {
|
||||
throw new Error("Not an expected error output: " + out.toString());
|
||||
throw new Error("Output not as expected");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue