< prev index next >

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

Print this page


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /*
  26  * @test
  27  * @summary Compare archived system modules with non-archived.
  28  * @requires vm.cds.archived.java.heap
  29  * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/appcds
  30  * @modules java.base/jdk.internal.misc
  31  *          java.management
  32  *          jdk.jartool/sun.tools.jar
  33  * @compile PrintSystemModulesApp.java
  34  * @run driver ClassFileInstaller -jar app.jar PrintSystemModulesApp
  35  * @run main ArchivedModuleCompareTest
  36  */
  37 
  38 import jdk.test.lib.process.OutputAnalyzer;
  39 import jdk.test.lib.process.ProcessTools;
  40 
  41 public class ArchivedModuleCompareTest {
  42     public static void main(String[] args) throws Exception {
  43         String appJar = ClassFileInstaller.getJarPath("app.jar");
  44 
  45         // Test case 1)
  46         // Compare the list of archived system module names with non-archived
  47         // list. They must be the same.
  48         System.out.println("---------------- Test case 1 -----------------");
  49         OutputAnalyzer output = TestCommon.dump(appJar,
  50                         TestCommon.list("PrintSystemModulesApp"));
  51         TestCommon.checkDump(output);
  52 
  53         output = TestCommon.execOff("-cp", appJar, "PrintSystemModulesApp");
  54         output.shouldHaveExitValue(0);
  55         String bootModules1 = output.getStdout();




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /*
  26  * @test
  27  * @summary Compare archived system modules with non-archived.
  28  * @requires vm.cds.archived.java.heap
  29  * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/appcds
  30  * @modules java.base/jdk.internal.misc
  31  *          java.management
  32  *          jdk.jartool/sun.tools.jar
  33  * @compile PrintSystemModulesApp.java
  34  * @run driver ClassFileInstaller -jar app.jar PrintSystemModulesApp
  35  * @run driver ArchivedModuleCompareTest
  36  */
  37 
  38 import jdk.test.lib.process.OutputAnalyzer;
  39 import jdk.test.lib.process.ProcessTools;
  40 
  41 public class ArchivedModuleCompareTest {
  42     public static void main(String[] args) throws Exception {
  43         String appJar = ClassFileInstaller.getJarPath("app.jar");
  44 
  45         // Test case 1)
  46         // Compare the list of archived system module names with non-archived
  47         // list. They must be the same.
  48         System.out.println("---------------- Test case 1 -----------------");
  49         OutputAnalyzer output = TestCommon.dump(appJar,
  50                         TestCommon.list("PrintSystemModulesApp"));
  51         TestCommon.checkDump(output);
  52 
  53         output = TestCommon.execOff("-cp", appJar, "PrintSystemModulesApp");
  54         output.shouldHaveExitValue(0);
  55         String bootModules1 = output.getStdout();


< prev index next >