< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/cacheObject/CheckCachedMirrorTest.java

Print this page

34  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar CheckCachedMirrorApp
35  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar hello.jar Hello
36  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
37  * @run driver CheckCachedMirrorTest
38  */
39 
40 import jdk.test.lib.process.OutputAnalyzer;
41 import jdk.test.lib.helpers.ClassFileInstaller;
42 import sun.hotspot.WhiteBox;
43 
44 public class CheckCachedMirrorTest {
45     public static void main(String[] args) throws Exception {
46         String wbJar = ClassFileInstaller.getJarPath("WhiteBox.jar");
47         String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar;
48         String appJar = ClassFileInstaller.getJarPath("app.jar");
49         String helloJarPath = ClassFileInstaller.getJarPath("hello.jar");
50 
51         String classlist[] = new String[] {
52             "CheckCachedMirrorApp",            // built-in app loader
53             "java/lang/Object id: 1",          // boot loader
54             "Hello id: 2 super: 1 source: " + helloJarPath // custom loader

55         };
56 
57         TestCommon.testDump(appJar, classlist, use_whitebox_jar);
58         OutputAnalyzer output = TestCommon.exec(appJar, use_whitebox_jar,
59                                                 "-XX:+UnlockDiagnosticVMOptions",
60                                                 "-XX:+WhiteBoxAPI",
61                                                 "-Xlog:cds=debug",
62                                                 "CheckCachedMirrorApp",
63                                                 helloJarPath);
64         TestCommon.checkExec(output);
65     }
66 }

34  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar CheckCachedMirrorApp
35  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar hello.jar Hello
36  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
37  * @run driver CheckCachedMirrorTest
38  */
39 
40 import jdk.test.lib.process.OutputAnalyzer;
41 import jdk.test.lib.helpers.ClassFileInstaller;
42 import sun.hotspot.WhiteBox;
43 
44 public class CheckCachedMirrorTest {
45     public static void main(String[] args) throws Exception {
46         String wbJar = ClassFileInstaller.getJarPath("WhiteBox.jar");
47         String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar;
48         String appJar = ClassFileInstaller.getJarPath("app.jar");
49         String helloJarPath = ClassFileInstaller.getJarPath("hello.jar");
50 
51         String classlist[] = new String[] {
52             "CheckCachedMirrorApp",            // built-in app loader
53             "java/lang/Object id: 1",          // boot loader
54             "java/lang/IdentityObject id: 2",  // boot loader
55             "Hello id: 3 super: 1 interfaces: 2 source: " + helloJarPath // custom loader
56         };
57 
58         TestCommon.testDump(appJar, classlist, use_whitebox_jar);
59         OutputAnalyzer output = TestCommon.exec(appJar, use_whitebox_jar,
60                                                 "-XX:+UnlockDiagnosticVMOptions",
61                                                 "-XX:+WhiteBoxAPI",
62                                                 "-Xlog:cds=debug",
63                                                 "CheckCachedMirrorApp",
64                                                 helloJarPath);
65         TestCommon.checkExec(output);
66     }
67 }
< prev index next >