Access ${TESTCLASSES} on @run?
Weijun Wang
weijun.wang at oracle.com
Tue Nov 13 16:54:07 PST 2012
Is there a way to access the $TESTCLASSES env variable on @run?
I am writing a test that would need to prepend a class path to
bootclasspath. Currently I have to use a shell script:
$TESTJAVA/bin/javac -d . \
${TESTSRC}/NamingManager.java ${TESTSRC}/DNS.java
$TESTJAVA/bin/java -Xbootclasspath/p:. DNS
It will be nice if I can only write
* @build NamingManager
* @run main/othervm -Xbootclasspath/p:$TESTCLASSES DNS
I know I can move the classes from TESTCLASSES to pwd by adding a line
at the top of the test:
Files.move(Paths.get(System.getProperty("test.classes") + "/javax"),
Paths.get("javax"));
so that the test can be executed with
* @run main/othervm -Xbootclasspath/p:. DNS
but that's really ugly.
Thanks
Max
More information about the jtreg-use
mailing list