--- old/test/jtreg-ext/requires/VMProps.java 2017-07-31 20:20:03.000000000 -0700 +++ new/test/jtreg-ext/requires/VMProps.java 2017-07-31 20:20:03.000000000 -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 /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.