< prev index next >

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

Print this page

103 
104             for (int i = 0; i < NUM_CLASSES; i++) {
105                 Path file = SRC_DIR.resolve(TOP_CLASS_NAME + i + ".java");
106                 Files.write(file, generateClass(i));
107             }
108 
109             Path mainFile = SRC_DIR.resolve(MAIN_CLASS_NAME + ".java");
110             Files.write(mainFile, generateMainClass());
111 
112             CDSJarUtils.buildFromSourceDirectory(
113                 APP_JAR.toString(),
114                 SRC_DIR.toString()
115             );
116         }
117 
118         // Step 2. Try to dump the archive.
119         {
120             OutputAnalyzer output = TestCommon.createArchive(
121                 APP_JAR.toString(),
122                 listAppClasses(),
123                 MAIN_CLASS_NAME,
124                 // Verification for lots of classes slows down the test.
125                 "-XX:+IgnoreUnrecognizedVMOptions",


126                 "-XX:-VerifyDependencies",
127                 "-XX:-VerifyBeforeExit"
128             );
129             TestCommon.checkDump(output);
130         }
131 
132         // Step 3. Try to run, touching every class.
133         {
134             TestCommon.run(
135                 // Verification for lots of classes slows down the test.
136                 "-XX:+IgnoreUnrecognizedVMOptions",

137                 "-XX:-VerifyDependencies",
138                 "-XX:-VerifyBeforeExit",
139                 "-cp", APP_JAR.toString(),
140                 MAIN_CLASS_NAME).
141                     assertNormalExit("Success");
142         }
143 
144     }
145 }

103 
104             for (int i = 0; i < NUM_CLASSES; i++) {
105                 Path file = SRC_DIR.resolve(TOP_CLASS_NAME + i + ".java");
106                 Files.write(file, generateClass(i));
107             }
108 
109             Path mainFile = SRC_DIR.resolve(MAIN_CLASS_NAME + ".java");
110             Files.write(mainFile, generateMainClass());
111 
112             CDSJarUtils.buildFromSourceDirectory(
113                 APP_JAR.toString(),
114                 SRC_DIR.toString()
115             );
116         }
117 
118         // Step 2. Try to dump the archive.
119         {
120             OutputAnalyzer output = TestCommon.createArchive(
121                 APP_JAR.toString(),
122                 listAppClasses(),

123                 // Verification for lots of classes slows down the test.
124                 "-XX:+IgnoreUnrecognizedVMOptions",
125                 "-XX:+UnlockDiagnosticVMOptions",
126                 "-XX:-ArchiveLoaderLookupCache", // LEYDEN_ONLY - work around JDK-8365959
127                 "-XX:-VerifyDependencies",
128                 "-XX:-VerifyBeforeExit"
129             );
130             TestCommon.checkDump(output);
131         }
132 
133         // Step 3. Try to run, touching every class.
134         {
135             TestCommon.run(
136                 // Verification for lots of classes slows down the test.
137                 "-XX:+IgnoreUnrecognizedVMOptions",
138                 "-XX:+UnlockDiagnosticVMOptions",
139                 "-XX:-VerifyDependencies",
140                 "-XX:-VerifyBeforeExit",
141                 "-cp", APP_JAR.toString(),
142                 MAIN_CLASS_NAME).
143                     assertNormalExit("Success");
144         }
145 
146     }
147 }
< prev index next >