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

Use JUnit.dir jtreg property with jpackage JUnit tests

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 22
    • tools
    • b16
    • generic
    • generic

      Currently, each jpackage JUnit test class is accompanied with

      /*
       * @test
       * @modules jdk.jpackage
       * @compile --patch-module jdk.jpackage=${test.src} --add-reads jdk.jpackage=ALL-UNNAMED --add-exports jdk.jpackage/jdk.jpackage.internal=ALL-UNNAMED PathGroupTest.java
       * @run junit/othervm --patch-module jdk.jpackage=${test.classes} --add-reads jdk.jpackage=ALL-UNNAMED --add-exports jdk.jpackage/jdk.jpackage.internal=ALL-UNNAMED jdk.jpackage.internal.PathGroupTest
       */

      comment. The comment was added in JDK-8292316 patch. It would be better to eliminate it as it is duplicated across all jpackage JUnit tests.

      When JDK-8292316 was fixed jtreg provided only experimental support for "JUnit.dirs" property that would eliminate the need to place "@run junit/othervm" comment in each JUnit test.

      Recent jtreg officially supports "JUnit.dirs" property.

      Christian Stein suggested the following changes to eliminate the need to have "@run junit/othervm" comment in each jpackage JUnit test:
       
       1. Move JUnit tests from "test/jdk/tools/jpackage/junit" to "test/jdk/tools/jpackage/junit/jdk.jpackage" directory.
       2. Add "test/jdk/tools/jpackage/junit/TEST.properties" file with "JUnit.dirs = ." contents.

            asemenyuk Alexey Semenyuk
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: