See CODETOOLS-7901527 for background and more details.
The use of "@library /../../test/lib" causes the directory "test/lib" to be created in the current directory. Also, any .java file located in /../../test/lib that is explicitly compiled with @build will also end up in this directory (implicitly compiled files do not).
The ../ notation in jtreg tests is generally discouraged, and support in jtreg has been added to make it so it is no longer necessary. Adding the following to TEST.ROOT:
external.lib.roots = ../../
Makes it so now you can just use:
* @library /test/lib
This bug is only meant to address the issue of files/directories being created outside the JTwork directory. It will not address all uses of ../, which are not problematic if they don't take you above the root of the test directory.
The use of "@library /../../test/lib" causes the directory "test/lib" to be created in the current directory. Also, any .java file located in /../../test/lib that is explicitly compiled with @build will also end up in this directory (implicitly compiled files do not).
The ../ notation in jtreg tests is generally discouraged, and support in jtreg has been added to make it so it is no longer necessary. Adding the following to TEST.ROOT:
external.lib.roots = ../../
Makes it so now you can just use:
* @library /test/lib
This bug is only meant to address the issue of files/directories being created outside the JTwork directory. It will not address all uses of ../, which are not problematic if they don't take you above the root of the test directory.
- relates to
-
JDK-8141489 [TESTBUG] requiredVersion in TEST.ROOT needs to updated to 4.1 b12
- Resolved
-
JDK-8141331 Test hotspot/compiler/oracle/MethodMatcher.java fails with NPE
- Resolved
-
CODETOOLS-7901527 jtreg produces class files outside the JTwork directory
- Closed
-
JDK-8148012 get rid of slash-dot-dot in @library directives
- Resolved