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

make of jtreg_tests fails if no tests are run, causing jprt test runs to also fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b133

      Description

      If you do something like:

      >$ make CONF_NAME=linux-x86-debug TESTDIRS=../../hotspot/test/<sometest>.java jtreg_tests PRODUCT_HOME=<jdkbuild>

      and <sometest>.java has a @requires that prevents it from running on the current platform, make will exit with a non-zero exit code. Here's the tail of the output:

      ...
      Directory "/local/ws/jdk9/hs3/hotspot/testoutput/JTwork" not found: creating
      Directory "/local/ws/jdk9/hs3/hotspot/testoutput/JTreport" not found: creating
      Test results: no tests selected
      Report written to /local/ws/jdk9/hs3/hotspot/testoutput/JTreport/html/report.html
      Results written to /local/ws/jdk9/hs3/hotspot/testoutput/JTwork
      Summary:
      TEST STATS: name= run=0 pass=0 fail=0
      EXIT CODE: 1
      EXIT CODE: 1
      make: *** [jtreg_tests] Error 1

      This causes problems when you are trying to run a single jtreg tests on all platforms with jprt. All test runs on platforms that don't run the test due to @requires will end up failing because of the non zero exit code.

      The exit code is coming from jtreg, but it's up to test/Makefile to handle it properly. An exit code of 1 specifically means that no tests were run, so test/Makefile can special case this exit code and zero it out so it does not cause make to exit with a non-zero exit code.

        Attachments

          Activity

            People

            Assignee:
            cjplummer Chris Plummer
            Reporter:
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: