--- a/test/jtreg-ext/requires/VMProps.java Wed Jul 05 18:23:35 2017 -0700
+++ b/test/jtreg-ext/requires/VMProps.java Wed Aug 02 08:52:14 2017 -0700
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.nio.file.Files;
+import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
@@ -69,6 +70,7 @@
map.put("vm.cpu.features", cpuFeatures());
map.put("vm.rtm.cpu", vmRTMCPU());
map.put("vm.rtm.os", vmRTMOS());
+ map.put("vm.aot", vmAOT());
vmGC(map); // vm.gc.X = true/false
VMProps.dump(map);
@@ -239,6 +241,22 @@
}
/**
+ * @return true if VM supports AOT and false otherwise
+ */
+ protected String vmAOT() {
+ // builds with aot have jaotc in <JDK>/bin
+ Path bin = Paths.get(System.getProperty("java.home"))
+ .resolve("bin");
+ Path jaotc;
+ if (Platform.isWindows()) {
+ jaotc = bin.resolve("jaotc.exe");
+ } else {
+ jaotc = bin.resolve("jaotc");
+ }
+ return "" + Files.exists(jaotc);
+ }
+
+ /**
* 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
* execution.