8341553: Remove UseCompactObjectHeaders extra CDS archives
Reviewed-by: erikj, iklam, coleenp
This commit is contained in:
parent
81e43114ec
commit
acdbf83325
@ -253,6 +253,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||||||
configure_args: concat(
|
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",
|
"--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-jvm-feature-shenandoahgc",
|
||||||
|
"--disable-cds-archive-coh",
|
||||||
versionArgs(input, common))
|
versionArgs(input, common))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,12 +66,32 @@
|
|||||||
* @run driver TestDefaultArchiveLoading coops_coh
|
* @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.Platform;
|
||||||
import jdk.test.lib.process.OutputAnalyzer;
|
import jdk.test.lib.process.OutputAnalyzer;
|
||||||
import jdk.test.lib.process.ProcessTools;
|
import jdk.test.lib.process.ProcessTools;
|
||||||
|
|
||||||
import jtreg.SkippedException;
|
import jtreg.SkippedException;
|
||||||
|
|
||||||
public class TestDefaultArchiveLoading {
|
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 {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
if (args.length != 1) {
|
if (args.length != 1) {
|
||||||
@ -90,6 +110,10 @@ public class TestDefaultArchiveLoading {
|
|||||||
coops = '-';
|
coops = '-';
|
||||||
coh = '+';
|
coh = '+';
|
||||||
archiveSuffix = "_nocoops_coh";
|
archiveSuffix = "_nocoops_coh";
|
||||||
|
if (!isCOHArchiveAvailable(coops, coh, archiveSuffix)) {
|
||||||
|
throw new SkippedException("Skipping test due to " +
|
||||||
|
archivePath(archiveSuffix).toString() + " not available");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "coops_nocoh":
|
case "coops_nocoh":
|
||||||
coops = '+';
|
coops = '+';
|
||||||
@ -99,6 +123,10 @@ public class TestDefaultArchiveLoading {
|
|||||||
case "coops_coh":
|
case "coops_coh":
|
||||||
coh = coops = '+';
|
coh = coops = '+';
|
||||||
archiveSuffix = "_coh";
|
archiveSuffix = "_coh";
|
||||||
|
if (!isCOHArchiveAvailable(coops, coh, archiveSuffix)) {
|
||||||
|
throw new SkippedException("Skipping test due to " +
|
||||||
|
archivePath(archiveSuffix).toString() + " not available");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default: throw new RuntimeException("Invalid argument " + args[0]);
|
default: throw new RuntimeException("Invalid argument " + args[0]);
|
||||||
}
|
}
|
||||||
@ -114,7 +142,6 @@ public class TestDefaultArchiveLoading {
|
|||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
|
||||||
output.shouldContain("classes" + archiveSuffix + ".jsa");
|
output.shouldContain(archiveName(archiveSuffix));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user