Skip to content

Commit 47ad3b4

Browse files
committed
8273774: CDSPluginTest should only expect classes_nocoops.jsa exists on supported 64-bit platforms
Backport-of: 83020617e70d40a42029720534af561f8af8bce2
1 parent 51502b9 commit 47ad3b4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

test/jdk/tools/jlink/plugins/CDSPluginTest.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
import tests.Helper;
3131

32+
import jtreg.SkippedException;
33+
3234
/* @test
3335
* @bug 8264322
3436
* @summary Test the --generate-cds-archive plugin
@@ -49,6 +51,9 @@ public class CDSPluginTest {
4951

5052
public static void main(String[] args) throws Throwable {
5153

54+
if (!Platform.isDefaultCDSArchiveSupported())
55+
throw new SkippedException("not a supported platform");
56+
5257
Helper helper = Helper.newHelper();
5358
if (helper == null) {
5459
System.err.println("Test not run");
@@ -69,8 +74,14 @@ public static void main(String[] args) throws Throwable {
6974
subDir = "lib" + sep;
7075
}
7176
subDir += "server" + sep;
72-
helper.checkImage(image, module, null, null,
73-
new String[] { subDir + "classes.jsa", subDir + "classes_nocoops.jsa" });
77+
78+
if (Platform.isAArch64() || Platform.isX64()) {
79+
helper.checkImage(image, module, null, null,
80+
new String[] { subDir + "classes.jsa", subDir + "classes_nocoops.jsa" });
81+
} else {
82+
helper.checkImage(image, module, null, null,
83+
new String[] { subDir + "classes.jsa" });
84+
}
7485

7586
// Simulate different platforms between current runtime and target image.
7687
if (Platform.isLinux()) {

0 commit comments

Comments
 (0)