Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8251213

[TESTBUG] CDS tests shouldn't write output files into test.classes directory

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b11

      Description

      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);
          }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: