mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8343809: Add requires tag to mark tests that are incompatible with exploded image
Reviewed-by: alanb, dholmes
This commit is contained in:
parent
2daf12edd2
commit
53824cf2a9
@ -101,6 +101,7 @@ requires.properties= \
|
||||
container.support \
|
||||
systemd.support \
|
||||
jdk.containerized \
|
||||
jdk.explodedImage \
|
||||
jlink.runtime.linkable \
|
||||
jlink.packagedModules \
|
||||
jdk.static
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2025, 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
|
||||
@ -27,6 +27,7 @@
|
||||
* @modules java.base/jdk.internal.loader
|
||||
* java.logging
|
||||
* @requires vm.flagless
|
||||
* @requires !jdk.explodedImage
|
||||
* @library /test/lib
|
||||
* @run driver GetSysPkgTest
|
||||
*/
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, Google Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -27,6 +28,7 @@
|
||||
* @bug 8220095
|
||||
* @requires os.family == "linux" | os.family == "mac"
|
||||
* @requires vm.flagless
|
||||
* @requires !jdk.explodedImage
|
||||
* @requires !jdk.static
|
||||
* @library /test/lib
|
||||
* @modules java.management
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2025, 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
|
||||
@ -27,6 +27,7 @@
|
||||
* @summary Make sure -Xlog:class+load=info works properly with "modules" jimage,
|
||||
--patch-module, and with -Xbootclasspath/a
|
||||
* @requires vm.flagless
|
||||
* @requires !jdk.explodedImage
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @library /test/lib
|
||||
* @compile PatchModuleMain.java
|
||||
|
||||
@ -146,6 +146,7 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
map.put("jdk.containerized", this::jdkContainerized);
|
||||
map.put("vm.flagless", this::isFlagless);
|
||||
map.put("jdk.foreign.linker", this::jdkForeignLinker);
|
||||
map.put("jdk.explodedImage", this::explodedImage);
|
||||
map.put("jlink.packagedModules", this::packagedModules);
|
||||
map.put("jdk.static", this::isStatic);
|
||||
vmGC(map); // vm.gc.X = true/false
|
||||
@ -751,6 +752,20 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
return "" + "true".equalsIgnoreCase(isEnabled);
|
||||
}
|
||||
|
||||
private String explodedImage() {
|
||||
try {
|
||||
Path jmodFile = Path.of(System.getProperty("java.home"), "jmods", "java.base.jmod");
|
||||
if (Files.exists(jmodFile)) {
|
||||
return Boolean.FALSE.toString();
|
||||
} else {
|
||||
return Boolean.TRUE.toString();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
return errorWithMessage("Error in explodedImage " + t);
|
||||
}
|
||||
}
|
||||
|
||||
private String packagedModules() {
|
||||
// Some jlink tests require packaged modules being present (jmods).
|
||||
// For a runtime linkable image build packaged modules aren't present
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user