127 autoCreateArchive,
128 jsaOpt,
129 "-Xlog:cds",
130 "-Xlog:class+path=info",
131 "-cp", helloJar,
132 mainClass);
133 TestCommon.executeAndLog(pb, "no-default-archive")
134 .shouldHaveExitValue(0)
135 .shouldContain("Initialize static archive failed")
136 .shouldContain("Unable to map shared spaces")
137 .shouldNotContain("Dumping shared data to file");
138 if (jsaFile.exists()) {
139 throw new RuntimeException("Archive file " + jsaFileName + " should not be created at exit");
140 }
141 }
142 }
143
144 private static void removeDefaultArchives(String java_home_dst, String variant) {
145 removeDefaultArchive(java_home_dst, variant, "");
146 removeDefaultArchive(java_home_dst, variant, "_nocoops");
147 }
148
149 private static void removeDefaultArchive(String java_home_dst, String variant, String suffix) {
150 String fileName = java_home_dst + File.separator + "lib" + File.separator + variant +
151 File.separator + "classes" + suffix + ".jsa";
152 File f = new File(fileName);
153 if (f.delete()) {
154 System.out.println("======= removed " + fileName);
155 }
156 }
157 }
|
127 autoCreateArchive,
128 jsaOpt,
129 "-Xlog:cds",
130 "-Xlog:class+path=info",
131 "-cp", helloJar,
132 mainClass);
133 TestCommon.executeAndLog(pb, "no-default-archive")
134 .shouldHaveExitValue(0)
135 .shouldContain("Initialize static archive failed")
136 .shouldContain("Unable to map shared spaces")
137 .shouldNotContain("Dumping shared data to file");
138 if (jsaFile.exists()) {
139 throw new RuntimeException("Archive file " + jsaFileName + " should not be created at exit");
140 }
141 }
142 }
143
144 private static void removeDefaultArchives(String java_home_dst, String variant) {
145 removeDefaultArchive(java_home_dst, variant, "");
146 removeDefaultArchive(java_home_dst, variant, "_nocoops");
147 removeDefaultArchive(java_home_dst, variant, "_coh");
148 }
149
150 private static void removeDefaultArchive(String java_home_dst, String variant, String suffix) {
151 String fileName = java_home_dst + File.separator + "lib" + File.separator + variant +
152 File.separator + "classes" + suffix + ".jsa";
153 File f = new File(fileName);
154 if (f.delete()) {
155 System.out.println("======= removed " + fileName);
156 }
157 }
158 }
|