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

classpath in sameVM mode missing test.classes, test.src

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • jtreg3.2.2_02
    • None
    • tools
    • None
    • generic
    • generic

      When running in otherVM mode, the classpath contains the two directories
      System.getProperty("test.classes")
      System.getProperty("test.src")

      E.g. this program:

      /*
       * @test %I% %E%
       * @bug 5555555
       * @summary Explore javatest
       * @author Martin Buchholz
       */

      public class Dummy {
          static void printProperty(String p) {
      System.out.printf("%s=%s%n", p, System.getProperty(p));
          }
          public static void main(String[] args) throws Throwable {
      printProperty("java.class.path");
      printProperty("test.src");
      printProperty("test.classes");
      printProperty("user.dir");
          }
      }


      gives

      ----------System.out:(4/255)----------
      java.class.path=/u/martin/jct-tools/3.2.2_02/lib/jtreg.jar:/u/martin/ws/ovm/build/solaris-sparc/lib/tools.jar
      test.src=/u/martin/src/toy/DummyTest
      test.classes=/u/martin/src/toy/DummyTest/JTwork/classes
      user.dir=/u/martin/src/toy/DummyTest/JTwork/scratch

      in sameVM mode,

      while it gives

      ----------System.out:(4/372)----------
      java.class.path=/u/martin/jct-tools/3.2.2_02/lib/javatest.jar:/u/martin/jct-tools/3.2.2_02/lib/jtreg.jar:/u/martin/src/toy/DummyTest/JTwork/classes:/u/martin/src/toy/DummyTest:/u/martin/ws/ovm/build/solaris-sparc/lib/tools.jar
      test.src=/u/martin/src/toy/DummyTest
      test.classes=/u/martin/src/toy/DummyTest/JTwork/classes
      user.dir=/u/martin/src/toy/DummyTest/JTwork/scratch

      in regular otherVM mode.

      Should be trivial to fix, since whenever javatest invokes itself recursively
      to cd to the scratch directory, it must already have values of classpath,
      test.src and test.classes, so it merely needs to append to child's classpath.

            jjg Jonathan Gibbons
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: