The CDS test framework creates output files (such as classlist or stdout log files) into the "test.classes" directory. This makes it difficult to look for the output files.
The fix is to write the output to the scratch directory (i.e., the current directory)
=============
http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/test/lib/jdk/test/lib/cds/CDSTestUtils.java
public static File getTestArtifact(String name, boolean checkExistence) {
File dir = new File(System.getProperty("test.classes", "."));
File file = new File(dir, name);
if (checkExistence && !file.exists()) {
throw new RuntimeException("Cannot find " + file.getPath());
}
return file;
}
public static File getOutputFile(String name) {
File dir = new File(System.getProperty("test.classes", "."));
return new File(dir, testName + "-" + name);
}
The fix is to write the output to the scratch directory (i.e., the current directory)
=============
http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/test/lib/jdk/test/lib/cds/CDSTestUtils.java
public static File getTestArtifact(String name, boolean checkExistence) {
File dir = new File(System.getProperty("test.classes", "."));
File file = new File(dir, name);
if (checkExistence && !file.exists()) {
throw new RuntimeException("Cannot find " + file.getPath());
}
return file;
}
public static File getOutputFile(String name) {
File dir = new File(System.getProperty("test.classes", "."));
return new File(dir, testName + "-" + name);
}
- relates to
-
JDK-8251267 CDS tests should use CDSTestUtils.getOutputDir instead of System.getProperty("user.dir")
- Resolved