equal
deleted
inserted
replaced
50 String baseArchiveName = getNewArchiveName("base"); |
50 String baseArchiveName = getNewArchiveName("base"); |
51 dumpBaseArchive(baseArchiveName); |
51 dumpBaseArchive(baseArchiveName); |
52 doTest(baseArchiveName, topArchiveName); |
52 doTest(baseArchiveName, topArchiveName); |
53 } |
53 } |
54 |
54 |
|
55 private static final String JDWP_OPTION = |
|
56 "-Xrunjdwp:transport=dt_socket,server=y,suspend=n"; |
|
57 |
55 private static void doTest(String baseArchiveName, String topArchiveName) throws Exception { |
58 private static void doTest(String baseArchiveName, String topArchiveName) throws Exception { |
56 String appJar = ClassFileInstaller.getJarPath("hello.jar"); |
59 String appJar = ClassFileInstaller.getJarPath("hello.jar"); |
57 String mainClass = "Hello"; |
60 String mainClass = "Hello"; |
58 dump2(baseArchiveName, topArchiveName, |
61 dump2(baseArchiveName, topArchiveName, |
59 "-Xlog:cds", |
62 "-Xlog:cds", |
69 "-cp", appJar, mainClass) |
72 "-cp", appJar, mainClass) |
70 .assertNormalExit(output -> { |
73 .assertNormalExit(output -> { |
71 output.shouldContain("Hello source: shared objects file") |
74 output.shouldContain("Hello source: shared objects file") |
72 .shouldHaveExitValue(0); |
75 .shouldHaveExitValue(0); |
73 }); |
76 }); |
|
77 |
|
78 // Sanity test with JDWP options. |
|
79 // Test with the default base archive should be sufficient. |
|
80 if (baseArchiveName == null) { |
|
81 run2(baseArchiveName, topArchiveName, |
|
82 JDWP_OPTION, |
|
83 "-Xlog:class+load", |
|
84 "-Xlog:cds+dynamic=debug,cds=debug", |
|
85 "-cp", appJar, mainClass) |
|
86 .assertNormalExit(output -> { |
|
87 output.shouldContain("Hello source: shared objects file") |
|
88 .shouldHaveExitValue(0); |
|
89 }); |
|
90 } |
74 } |
91 } |
75 } |
92 } |