Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901758

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • jtreg4.2
    • 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

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

              Created:
              Updated:
              Resolved: