< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/StaticArchiveWithLambda.java

Print this page

45 
46         // dump class list
47         CDSTestUtils.dumpClassList(classList, "-cp", appJar, appClass);
48 
49         // create archive with the class list
50         CDSOptions opts = (new CDSOptions())
51             .addPrefix("-XX:ExtraSharedClassListFile=" + classList,
52                        "-cp", appJar,
53                        "-Xlog:class+load,cds")
54             .setArchiveName(archiveName);
55         CDSTestUtils.createArchiveAndCheck(opts);
56 
57         // run with archive
58         CDSOptions runOpts = (new CDSOptions())
59             .addPrefix("-cp", appJar, "-Xlog:class+load,cds=debug")
60             .setArchiveName(archiveName)
61             .setUseVersion(false)
62             .addSuffix(appClass);
63        OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
64        output.shouldContain("LambHello source: shared objects file")
65              .shouldMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file")

66              .shouldHaveExitValue(0);
67     }
68 }

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