51
52 // dump class list
53 CDSTestUtils.dumpClassList(classList, "-cp", appJar, mainClass);
54
55 // create archive with the class list
56 CDSOptions opts = (new CDSOptions())
57 .addPrefix("-XX:ExtraSharedClassListFile=" + classList,
58 "-cp", appJar,
59 "-Xlog:class+load,cds")
60 .setArchiveName(archiveName);
61 CDSTestUtils.createArchiveAndCheck(opts);
62
63 // run with archive
64 CDSOptions runOpts = (new CDSOptions())
65 .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
66 .setArchiveName(archiveName)
67 .setUseVersion(false)
68 .addSuffix(mainClass);
69 OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
70 output.shouldContain("[class,load] LambdaWithOldClassApp source: shared objects file")
71 .shouldMatch(".class.load. LambdaWithOldClassApp[$][$]Lambda.*/0x.*source:.*shared objects file")
72 .shouldHaveExitValue(0);
73 }
74 }
|
51
52 // dump class list
53 CDSTestUtils.dumpClassList(classList, "-cp", appJar, mainClass);
54
55 // create archive with the class list
56 CDSOptions opts = (new CDSOptions())
57 .addPrefix("-XX:ExtraSharedClassListFile=" + classList,
58 "-cp", appJar,
59 "-Xlog:class+load,cds")
60 .setArchiveName(archiveName);
61 CDSTestUtils.createArchiveAndCheck(opts);
62
63 // run with archive
64 CDSOptions runOpts = (new CDSOptions())
65 .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
66 .setArchiveName(archiveName)
67 .setUseVersion(false)
68 .addSuffix(mainClass);
69 OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
70 output.shouldContain("[class,load] LambdaWithOldClassApp source: shared objects file")
71 // FIXME:leyden-premain : we disabled archived Lambda proxy classes due to JDK-8307468
72 // .shouldMatch(".class.load. LambdaWithOldClassApp[$][$]Lambda.*/0x.*source:.*shared objects file")
73 .shouldHaveExitValue(0);
74 }
75 }
|