changeset 56456:9b644c06226f

8231503: [TESTBUG] compiler/{jvmci,aot} tests should not run with GCs that do not support JVMCI/AOT Reviewed-by: kvn, dlong, stefank
author shade
date Tue, 01 Oct 2019 15:38:26 +0200
parents d9b2b4085f9a
children eba8b29bf528
files test/jtreg-ext/requires/VMProps.java
diffstat 1 files changed, 34 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/jtreg-ext/requires/VMProps.java	Tue Oct 01 14:51:04 2019 +0200
+++ b/test/jtreg-ext/requires/VMProps.java	Tue Oct 01 15:38:26 2019 +0200
@@ -235,7 +235,22 @@
      */
     protected String vmJvmci() {
         // builds with jvmci have this flag
-        return "" + (WB.getBooleanVMFlag("EnableJVMCI") != null);
+        if (WB.getBooleanVMFlag("EnableJVMCI") == null) {
+            return "false";
+        }
+
+        switch (GC.selected()) {
+            case Serial:
+            case Parallel:
+            case G1:
+                // These GCs are supported with JVMCI
+                return "true";
+            default:
+                break;
+        }
+
+        // Every other GC is not supported
+        return "false";
     }
 
     /**
@@ -356,7 +371,24 @@
         } else {
             jaotc = bin.resolve("jaotc");
         }
-        return "" + Files.exists(jaotc);
+
+        if (!Files.exists(jaotc)) {
+            // No jaotc => no AOT
+            return "false";
+        }
+
+        switch (GC.selected()) {
+            case Serial:
+            case Parallel:
+            case G1:
+                // These GCs are supported with AOT
+                return "true";
+            default:
+                break;
+        }
+
+        // Every other GC is not supported
+        return "false";
     }
 
     /*