< prev index next >

test/hotspot/jtreg/runtime/appcds/cacheObject/ArchivedModuleWithCustomImageTest.java

Print this page




 113             "-Xshare:dump"};
 114         printCommand(dumpCmd);
 115         ProcessBuilder pbDump = new ProcessBuilder();
 116         pbDump.command(dumpCmd);
 117         OutputAnalyzer output = TestCommon.executeAndLog(
 118             pbDump, "custom.runtime.image.dump");
 119         TestCommon.checkDump(output);
 120 
 121         // Test case 1):
 122         // test archived module graph objects are used with custome runtime image
 123         System.out.println("------------------- Test case 1 -------------------");
 124         String[] runCmd = {customJava.toString(),
 125                            use_whitebox_jar,
 126                            "-XX:SharedArchiveFile=./ArchivedModuleWithCustomImageTest.jsa",
 127                            "-cp",
 128                            appJar,
 129                            "-Xshare:on",
 130                            "-XX:+UnlockDiagnosticVMOptions",
 131                            "-XX:+WhiteBoxAPI",
 132                            "CheckArchivedModuleApp",

 133                            "yes"};
 134         printCommand(runCmd);
 135         ProcessBuilder pbRun = new ProcessBuilder();
 136         pbRun.command(runCmd);
 137         output = TestCommon.executeAndLog(pbRun, "custom.runtime.image.run");
 138         output.shouldHaveExitValue(0);
 139 
 140 
 141         // Test case 2):
 142         // verify --show-module-resolution output
 143         System.out.println("------------------- Test case 2 -------------------");
 144 
 145         // myimage/bin/java -Xshare:off --show-module-resolution -version
 146         String[] showModuleCmd1 = {customJava.toString(),
 147                                    "-Xshare:off",
 148                                    "--show-module-resolution",
 149                                    "-version"};
 150         printCommand(showModuleCmd1);
 151         pbRun = new ProcessBuilder();
 152         pbRun.command(showModuleCmd1);




 113             "-Xshare:dump"};
 114         printCommand(dumpCmd);
 115         ProcessBuilder pbDump = new ProcessBuilder();
 116         pbDump.command(dumpCmd);
 117         OutputAnalyzer output = TestCommon.executeAndLog(
 118             pbDump, "custom.runtime.image.dump");
 119         TestCommon.checkDump(output);
 120 
 121         // Test case 1):
 122         // test archived module graph objects are used with custome runtime image
 123         System.out.println("------------------- Test case 1 -------------------");
 124         String[] runCmd = {customJava.toString(),
 125                            use_whitebox_jar,
 126                            "-XX:SharedArchiveFile=./ArchivedModuleWithCustomImageTest.jsa",
 127                            "-cp",
 128                            appJar,
 129                            "-Xshare:on",
 130                            "-XX:+UnlockDiagnosticVMOptions",
 131                            "-XX:+WhiteBoxAPI",
 132                            "CheckArchivedModuleApp",
 133                            "yes",
 134                            "yes"};
 135         printCommand(runCmd);
 136         ProcessBuilder pbRun = new ProcessBuilder();
 137         pbRun.command(runCmd);
 138         output = TestCommon.executeAndLog(pbRun, "custom.runtime.image.run");
 139         output.shouldHaveExitValue(0);
 140 
 141 
 142         // Test case 2):
 143         // verify --show-module-resolution output
 144         System.out.println("------------------- Test case 2 -------------------");
 145 
 146         // myimage/bin/java -Xshare:off --show-module-resolution -version
 147         String[] showModuleCmd1 = {customJava.toString(),
 148                                    "-Xshare:off",
 149                                    "--show-module-resolution",
 150                                    "-version"};
 151         printCommand(showModuleCmd1);
 152         pbRun = new ProcessBuilder();
 153         pbRun.command(showModuleCmd1);


< prev index next >