1 /*
2 * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
60 System.err.println("Test not run");
61 return;
62 }
63
64 var module = "cds";
65 helper.generateDefaultJModule(module);
66 var image = helper.generateDefaultImage(new String[] { "--generate-cds-archive" },
67 module)
68 .assertSuccess();
69
70 String subDir;
71 String sep = File.separator;
72 if (Platform.isWindows()) {
73 subDir = "bin" + sep;
74 } else {
75 subDir = "lib" + sep;
76 }
77 subDir += "server" + sep;
78
79 WhiteBox wb = WhiteBox.getWhiteBox();
80 boolean NOCOMPACT_HEADERS = Platform.is64bit() &&
81 !wb.getBooleanVMFlag("UseCompactObjectHeaders");
82 String suffix = NOCOMPACT_HEADERS ? "_nocoh.jsa" : ".jsa";
83
84 if (Platform.isAArch64() || Platform.isX64()) {
85 helper.checkImage(image, module, null, null,
86 new String[] { subDir + "classes" + suffix, subDir + "classes_nocoops" + suffix});
87 } else {
88 helper.checkImage(image, module, null, null,
89 new String[] { subDir + "classes" + suffix });
90 }
91 }
92 }
|
1 /*
2 * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
60 System.err.println("Test not run");
61 return;
62 }
63
64 var module = "cds";
65 helper.generateDefaultJModule(module);
66 var image = helper.generateDefaultImage(new String[] { "--generate-cds-archive" },
67 module)
68 .assertSuccess();
69
70 String subDir;
71 String sep = File.separator;
72 if (Platform.isWindows()) {
73 subDir = "bin" + sep;
74 } else {
75 subDir = "lib" + sep;
76 }
77 subDir += "server" + sep;
78
79 WhiteBox wb = WhiteBox.getWhiteBox();
80 boolean COMPACT_HEADERS = Platform.is64bit() &&
81 wb.getBooleanVMFlag("UseCompactObjectHeaders") &&
82 wb.isDefaultVMFlag("UseCompactObjectHeaders");
83
84 String suffix = COMPACT_HEADERS ? "_coh.jsa" : ".jsa";
85
86 if (Platform.isAArch64() || Platform.isX64()) {
87 helper.checkImage(image, module, null, null,
88 new String[] { subDir + "classes" + suffix, subDir + "classes_nocoops" + suffix });
89 } else {
90 helper.checkImage(image, module, null, null,
91 new String[] { subDir + "classes" + suffix });
92 }
93 }
94 }
|