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

allow source file of '@compile/module=<module>' action to be not in ./<module> directory

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      in case of @compile/module=<module>, jtreg prepends module name to source path location, so it's impossible to share source files b/w tests if they are in different directories.

      one example -- https://bugs.openjdk.java.net/browse/JDK-8143238
      in hotspot/test/compiler/jvmci, we have several tests which use hotspot/test/compiler/jvmci/common/CompilerToVMHelper.java. CompilerToVMHelper.java contains source code of jdk.vm.ci.hotspot.CompilerToVMHelper class, jdk.vm.ci module contains jdk.vm.ci.hotspot package.

      the tests which use CompilerToVMHelper class are located in compiler/jvmci/compilerToVM/, compiler/jvmci/events/ and compiler/jvmci/ directories. Currently these test just compile java file using a relative path (@compile ../common/CompilerToVMHelper.java) and jdk.vm.ci.hotspot.CompilerToVMHelper classfile to BCP (using ClassFileInstaller and -Xbcp/a:.).

      in jake, adding CompilerToVMHelper to BCP won't help, so we should use '@compile/module=jdk.vm.ci' instead, that forces us to move CompilerToVMHelper.java to jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java, but since jtreg search for modules directory in current directory and we have 3 different directories w/ tests which use CompilerToVMHelper, we have to have 3 copies of CompilerToVMHelper, which is not a very nice solution.

      so I think it would be good if it'll be possible to have relative path in '@compile' actions even in case of '@compile/module'.

            Unassigned Unassigned
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: