test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Cdiff test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java

test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java

Print this page

        

*** 108,119 **** "--upgrade-module-path", UPGRADEDMODS_DIR[0].toString() + System.getProperty("path.separator") + UPGRADEDMODS_DIR[1].toString() ); Asserts.assertTrue(compiled, TEST_MODULE + " did not compile"); ! // dump the archive with jdk.comiler and jdk.incubator.httpclient classes in the class list ! // with "--add-modules jdk.incubator.httpclient" OutputAnalyzer output = TestCommon.dump(null /* appJar*/, TestCommon.list(ARCHIVE_CLASSES)); TestCommon.checkDump(output); // Make sure all the classes where successfully archived. for (String archiveClass : ARCHIVE_CLASSES) { output.shouldNotContain("Preload Warning: Cannot find " + archiveClass); --- 108,118 ---- "--upgrade-module-path", UPGRADEDMODS_DIR[0].toString() + System.getProperty("path.separator") + UPGRADEDMODS_DIR[1].toString() ); Asserts.assertTrue(compiled, TEST_MODULE + " did not compile"); ! // dump the archive with jdk.compiler and java.net.http classes in the class list OutputAnalyzer output = TestCommon.dump(null /* appJar*/, TestCommon.list(ARCHIVE_CLASSES)); TestCommon.checkDump(output); // Make sure all the classes where successfully archived. for (String archiveClass : ARCHIVE_CLASSES) { output.shouldNotContain("Preload Warning: Cannot find " + archiveClass);
*** 166,188 **** prefix[2] = "--add-modules"; prefix[3] = "java.net.http"; // Run the test with --upgrade-module-path set to alternate location of archiveClass // The alternate version of archiveClass SHOULD be found. ! CDSTestUtils.Result res = TestCommon.runWithModules( ! prefix, UPGRADEDMODS_DIR[upgradeModIdx].toString(), MODS_DIR.toString(), mid, ! archiveClass, loaderName, "true"); // last 3 args passed to test ! ! output = res.getOutput(); ! try { ! output.shouldContain(expectedException); ! } catch (Exception e) { ! TestCommon.checkCommonExecExceptions(output, e); ! } // Now run this same test again, but this time without AppCDS. Behavior should be the same. CDSOptions opts = (new CDSOptions()) .addPrefix(prefix) .setArchiveName(testArchiveName).setUseVersion(false) --- 165,180 ---- prefix[2] = "--add-modules"; prefix[3] = "java.net.http"; // Run the test with --upgrade-module-path set to alternate location of archiveClass // The alternate version of archiveClass SHOULD be found. ! TestCommon.runWithModules(prefix, UPGRADEDMODS_DIR[upgradeModIdx].toString(), MODS_DIR.toString(), mid, ! archiveClass, loaderName, "true") // last 3 args passed to test ! .ifNoMappingFailure(out -> out.shouldContain(expectedException)); // Now run this same test again, but this time without AppCDS. Behavior should be the same. CDSOptions opts = (new CDSOptions()) .addPrefix(prefix) .setArchiveName(testArchiveName).setUseVersion(false)
*** 198,214 **** TestCommon.checkCommonExecExceptions(output, e); } // Run the test with -p set to alternate location of archiveClass. // The alternate version of archiveClass SHOULD NOT be found. ! res = TestCommon.runWithModules( prefix, null, UPGRADEDMODS_DIR[upgradeModIdx].toString() + java.io.File.pathSeparator + MODS_DIR.toString(), mid, ! archiveClass, loaderName, "false"); // last 3 args passed to test ! TestCommon.checkExec(res.getOutput()); // Now run this same test again, but this time without AppCDS. Behavior should be the same. opts = (new CDSOptions()) .addPrefix(prefix) .setArchiveName(testArchiveName).setUseVersion(false) --- 190,206 ---- TestCommon.checkCommonExecExceptions(output, e); } // Run the test with -p set to alternate location of archiveClass. // The alternate version of archiveClass SHOULD NOT be found. ! TestCommon.runWithModules( prefix, null, UPGRADEDMODS_DIR[upgradeModIdx].toString() + java.io.File.pathSeparator + MODS_DIR.toString(), mid, ! archiveClass, loaderName, "false") // last 3 args passed to test ! .assertNormalExit(); // Now run this same test again, but this time without AppCDS. Behavior should be the same. opts = (new CDSOptions()) .addPrefix(prefix) .setArchiveName(testArchiveName).setUseVersion(false)
test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File