8294691: dynamicArchive/RelativePath.java is running other test case

Reviewed-by: iklam, ccheung
This commit is contained in:
Matias Saavedra Silva 2022-10-07 20:44:35 +00:00 committed by Calvin Cheung
parent 823b53d895
commit 3466e99934

View File

@ -39,7 +39,7 @@ import java.io.File;
public class RelativePath extends DynamicArchiveTestBase { public class RelativePath extends DynamicArchiveTestBase {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
runTest(AppendClasspath::testDefaultBase); runTest(RelativePath::testDefaultBase);
} }
static void testDefaultBase() throws Exception { static void testDefaultBase() throws Exception {
@ -54,6 +54,16 @@ public class RelativePath extends DynamicArchiveTestBase {
int idx = appJar.lastIndexOf(File.separator); int idx = appJar.lastIndexOf(File.separator);
String jarName = appJar.substring(idx + 1); String jarName = appJar.substring(idx + 1);
String jarDir = appJar.substring(0, idx); String jarDir = appJar.substring(0, idx);
// Create CDS Archive
dump(topArchiveName, "-Xlog:cds",
"-Xlog:cds+dynamic=debug",
"-cp", appJar + File.pathSeparator + appJar2,
"HelloMore")
.assertNormalExit(output-> {
output.shouldContain("Written dynamic archive 0x");
});
// relative path starting with "." // relative path starting with "."
runWithRelativePath(null, topArchiveName, jarDir, runWithRelativePath(null, topArchiveName, jarDir,
"-Xlog:class+load", "-Xlog:class+load",