8164866: tools/jlink/plugins/GenerateJLIClassesPluginTest.java can't compile after JDK-8163371
Reviewed-by: sundar, vlivanov
This commit is contained in:
parent
e079e3b069
commit
2d02799b3b
jdk
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins
test/tools/jlink/plugins
@ -110,7 +110,7 @@ public final class GenerateJLIClassesPlugin implements Plugin {
|
||||
* A better long-term solution is to define and run a set of quick
|
||||
* generators and extracting this list as a step in the build process.
|
||||
*/
|
||||
private static List<String> defaultSpecies() {
|
||||
public static List<String> defaultSpecies() {
|
||||
return List.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
|
||||
"L7II", "L7IIL", "L8", "L9", "L10", "L10I", "L10II", "L10IIL",
|
||||
"L11", "L12", "L13", "LI", "D", "L3I", "LIL", "LLI", "LLIL",
|
||||
|
@ -73,47 +73,6 @@ public class GenerateJLIClassesPluginTest {
|
||||
classFilesForSpecies(GenerateJLIClassesPlugin.defaultSpecies()),
|
||||
List.of());
|
||||
|
||||
|
||||
// Test a valid set of options
|
||||
result = JImageGenerator.getJLinkTask()
|
||||
.modulePath(helper.defaultModulePath())
|
||||
.output(helper.createNewImageDir("generate-jli"))
|
||||
.option("--generate-jli-classes=bmh:bmh-species=LL,L3")
|
||||
.addMods("java.base")
|
||||
.call();
|
||||
|
||||
image = result.assertSuccess();
|
||||
|
||||
JImageValidator.validate(
|
||||
image.resolve("lib").resolve("modules"),
|
||||
classFilesForSpecies(List.of("LL", "L3")),
|
||||
classFilesForSpecies(List.of("L4")));
|
||||
|
||||
|
||||
// Test disabling BMH species generation
|
||||
result = JImageGenerator.getJLinkTask()
|
||||
.modulePath(helper.defaultModulePath())
|
||||
.output(helper.createNewImageDir("generate-jli"))
|
||||
.option("--generate-jli-classes=not-bmh:bmh-species=LL,L3")
|
||||
.addMods("java.base")
|
||||
.call();
|
||||
|
||||
image = result.assertSuccess();
|
||||
JImageValidator.validate(
|
||||
image.resolve("lib").resolve("modules"),
|
||||
List.of(),
|
||||
classFilesForSpecies(List.of("LL", "L3", "L4")));
|
||||
|
||||
|
||||
// Test an invalid set of options
|
||||
result = JImageGenerator.getJLinkTask()
|
||||
.modulePath(helper.defaultModulePath())
|
||||
.output(helper.createNewImageDir("generate-jli"))
|
||||
.option("--generate-jli-classes=bmh:bmh-species=LL,L7V")
|
||||
.addMods("java.base")
|
||||
.call();
|
||||
|
||||
result.assertFailure();
|
||||
}
|
||||
|
||||
private static List<String> classFilesForSpecies(List<String> species) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user