8238263: Create at-requires mechanism for containers

Reviewed-by: bobv, iignatyev
This commit is contained in:
Harold Seigel 2020-10-26 20:30:37 +00:00
parent a7fa1b70f2
commit ca8bba64dc
3 changed files with 10 additions and 2 deletions

View File

@ -75,7 +75,8 @@ requires.properties= \
vm.compiler2.enabled \
vm.musl \
docker.support \
test.vm.gc.nvdimm
test.vm.gc.nvdimm \
jdk.containerized
# Minimum jtreg version
requiredVersion=5.1 b1

View File

@ -58,7 +58,8 @@ requires.properties= \
vm.hasJFR \
vm.jvmci \
docker.support \
release.implementor
release.implementor \
jdk.containerized
# Minimum jtreg version
requiredVersion=5.1 b1

View File

@ -118,6 +118,7 @@ public class VMProps implements Callable<Map<String, String>> {
map.put("vm.musl", this::isMusl);
map.put("release.implementor", this::implementor);
map.put("test.vm.gc.nvdimm", this::isNvdimmTestEnabled);
map.put("jdk.containerized", this::jdkContainerized);
vmGC(map); // vm.gc.X = true/false
vmOptFinalFlags(map);
@ -545,6 +546,11 @@ public class VMProps implements Callable<Map<String, String>> {
return "" + "true".equalsIgnoreCase(isEnabled);
}
private String jdkContainerized() {
String isEnabled = System.getenv("TEST_JDK_CONTAINERIZED");
return "" + "true".equalsIgnoreCase(isEnabled);
}
/**
* Dumps the map to the file if the file name is given as the property.
* This functionality could be helpful to know context in the real