test is not selected if non-tag comment exists after valid @modules lines

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: jtreg4.2
    • Component/s: tools
    • None

      See following test, there is a simple comment line after @modules (and with a blank comment line in between).
      Test is not selected by jtreg.

      An empty comment line won't be identified as the end of tag @modules, all strings after @modules and before the next tag starts (comment line begin with @ ) will be taken as the value of modules. This makes confusion.

      Test example:

      /*
       * @test
       * @modules java.base
       *
       * comment without at tag blabla
       */
      public class Test {
          public static void main(String... args) {
              System.out.println("JavaBaseTest");
          }
      }


      Tested with jtreg4.2 promoted b02, b03, jtreg4.2 b03 nightly.

      jtreg/bin/jtreg -jdk:/path/images/jdk /path/dev/jdk/test/Test.java
      Test results: no tests selected
      Report written to /Users/admin/OpenJDK/JTreport/html/report.html
      Results written to /Users/admin/OpenJDK/JTwork

            Assignee:
            Jonathan Gibbons
            Reporter:
            Amy Lu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: