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

Remove dependence on JAR filename in CDS tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 19
    • Fix Version/s: 19
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22
    • OS:
      generic

      Description

      Tests generated by CDSMHTest_generate.sh scripts include a hard-coded assumption on from where JUnit classes are loaded from. Namely: junit.jar This filename will change in JTREg 7 as described in https://bugs.openjdk.java.net/browse/CODETOOLS-7903047 and attached PRs.
      In addition, the code seems to fail on splitting the class path correctly on Windows systems using Cygwin.

      Possible fix for both issues: Use the location information stored in JUnit Test class' runtime representation.

      String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cstein Christian Stein
              Reporter:
              cstein Christian Stein
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: