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

support whitelist for tests that can be run -samevm

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • jtreg4.0
    • tools
    • None
    • generic
    • generic

      http://mail.openjdk.java.net/pipermail/jtreg-use/2008-November/000048.html

      Hi,

      Jonathan Gibbons has been extending jtreg so that tests can be run in
      the same vm. He also made it so that most langtools tests are run that
      way. That brings an enormous speed up. Since running all jdk tests takes
      ages it would be great if we could use this same speedup there.

      Problem is that -samevm only works if all tests have been adapted to
      behave well (or marked as needing /othervm). So my idea was to add a
      "whitelist mechanism" so you can indicate which (sub)dirs are ready to
      be run with samevm.

      Luckily jtreg has mostly been setup for this already. All Actions ask
      their Script whether or not they should be running in an othervm. So we
      hook into that to check the scripts location against a whitelist.

      I choose the TEST.ROOT file as the location of the whitelist. Since that
      is also the root of the test suite. I made the code so that the
      whitelist is only used when running the full test suite from the root.
      That way you can still experiment with -samevm or -othervm when running
      subtrees of tests.

      Also CCed jdk-regtest at sun.com since that address is mentioned in the
      TEST.ROOT file with an request to contact them if you change anything in
      that file.

      Below is the implementation as I checked into icedtea6 (patch also
      attached).

      2008-11-23 Mark Wielaard <mark at klomp.org>

          * test/jtreg/com/sun/javatest/regtest/Main.java
          (createParameters): Set same jvm safe dirs when non-null.
          (getSameJVMSafeDirs): New method that reads samejvmsafe property
          from TEST.ROOT.
          (sameJVMSafeDirs): New private field.
          * test/jtreg/com/sun/javatest/regtest/RegressionParameters.java
          (SAME_JVM_SAFE_DIRS): New static final field.
          (load): Read same jvm safe dirs.
          (save0): Write same jvm safe dirs.
          (getSameJVMSafeDirs): New method.
          (setSameJVMSafeDirs): New method.
          * test/jtreg/com/sun/javatest/regtest/RegressionScript.java
          (run): Set testDirPath.
          (isOtherJVM): Take same jvm safe into account.
          (isSameJVMSafe): New method.
          (testDirPath): New private field.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: