< prev index next >

test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java

Print this page
*** 85,12 ***
  
  import jtreg.SkippedException;
  
  public class TestDefaultArchiveLoading {
  
      private static String archiveName(String archiveSuffix) {
!         return "classes" + archiveSuffix + ".jsa";
      }
  
      private static Path archivePath(String archiveSuffix) {
          return Paths.get(System.getProperty("java.home"), "lib",
                           "server", archiveName(archiveSuffix));
--- 85,14 ---
  
  import jtreg.SkippedException;
  
  public class TestDefaultArchiveLoading {
  
+     static String archivePreviewSuffix = "";
+ 
      private static String archiveName(String archiveSuffix) {
!         return "classes" + archiveSuffix + archivePreviewSuffix + ".jsa";
      }
  
      private static Path archivePath(String archiveSuffix) {
          return Paths.get(System.getProperty("java.home"), "lib",
                           "server", archiveName(archiveSuffix));

*** 108,10 ***
--- 110,14 ---
              throw new RuntimeException("Expected argument");
          }
  
          String archiveSuffix;
          char coh, coops;
+         String preview = System.getProperty("test.java.opts", "");
+         if (preview.contains("--enable-preview")) {
+             archivePreviewSuffix = "_preview";
+         }
  
          switch (args[0]) {
              case "nocoops_nocoh":
                  coh = coops = '-';
                  archiveSuffix = "_nocoops";
< prev index next >