diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index a28d85c146f..25cf15c5f3b 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -253,6 +253,7 @@ var getJibProfilesCommon = function (input, data) { configure_args: concat( "--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK", "--disable-jvm-feature-shenandoahgc", + "--disable-cds-archive-coh", versionArgs(input, common)) }; diff --git a/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java b/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java index 590f22feed7..192f7ca42a8 100644 --- a/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java +++ b/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java @@ -66,12 +66,32 @@ * @run driver TestDefaultArchiveLoading coops_coh */ +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; + 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)); + } + + private static boolean isCOHArchiveAvailable(char coops, char coh, + String archiveSuffix) throws Exception { + Path archive= archivePath(archiveSuffix); + return Files.exists(archive); + } + public static void main(String[] args) throws Exception { if (args.length != 1) { @@ -90,6 +110,10 @@ public class TestDefaultArchiveLoading { coops = '-'; coh = '+'; archiveSuffix = "_nocoops_coh"; + if (!isCOHArchiveAvailable(coops, coh, archiveSuffix)) { + throw new SkippedException("Skipping test due to " + + archivePath(archiveSuffix).toString() + " not available"); + } break; case "coops_nocoh": coops = '+'; @@ -99,6 +123,10 @@ public class TestDefaultArchiveLoading { case "coops_coh": coh = coops = '+'; archiveSuffix = "_coh"; + if (!isCOHArchiveAvailable(coops, coh, archiveSuffix)) { + throw new SkippedException("Skipping test due to " + + archivePath(archiveSuffix).toString() + " not available"); + } break; default: throw new RuntimeException("Invalid argument " + args[0]); } @@ -114,7 +142,6 @@ public class TestDefaultArchiveLoading { OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldHaveExitValue(0); - output.shouldContain("classes" + archiveSuffix + ".jsa"); - + output.shouldContain(archiveName(archiveSuffix)); } }