8286460: Remove dependence on JAR filename in CDS tests
Reviewed-by: ccheung, iklam
This commit is contained in:
parent
9073a98d57
commit
52dbfa99fe
test/hotspot/jtreg/runtime/cds/appcds
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -102,14 +102,7 @@ public class $i extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
11
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesAsCollectorTest.java
11
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesAsCollectorTest.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,14 +70,7 @@ public class MethodHandlesAsCollectorTest extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
11
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesCastFailureTest.java
11
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesCastFailureTest.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,14 +70,7 @@ public class MethodHandlesCastFailureTest extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,14 +70,7 @@ public class MethodHandlesGeneralTest extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
11
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesInvokersTest.java
11
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesInvokersTest.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,14 +70,7 @@ public class MethodHandlesInvokersTest extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,14 +70,7 @@ public class MethodHandlesPermuteArgumentsTest extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -70,14 +70,7 @@ public class MethodHandlesSpreadArgumentsTest extends DynamicArchiveTestBase {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
dumpAndRun(topArchiveName, "-Xlog:cds,cds+dynamic=debug,class+load=trace",
|
||||
"-cp", appJar + ps + junitJar, verifyOpt,
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -106,14 +106,7 @@ public class $i {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,14 +74,7 @@ public class MethodHandlesAsCollectorTest {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,14 +74,7 @@ public class MethodHandlesCastFailureTest {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,14 +74,7 @@ public class MethodHandlesGeneralTest {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,14 +74,7 @@ public class MethodHandlesInvokersTest {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,14 +74,7 @@ public class MethodHandlesPermuteArgumentsTest {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,14 +74,7 @@ public class MethodHandlesSpreadArgumentsTest {
|
||||
String verifyOpt =
|
||||
Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "-showversion";
|
||||
|
||||
String[] classPaths = javaClassPath.split(File.pathSeparator);
|
||||
String junitJar = null;
|
||||
for (String path : classPaths) {
|
||||
if (path.endsWith("junit.jar")) {
|
||||
junitJar = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();
|
||||
|
||||
String jars = appJar + ps + junitJar;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user