On 02/01/2013 01:32 PM, Alan Bateman wrote:
On 01/02/2013 12:12, Yekaterina Kantserova wrote:
Hi everyone,

Here comes a http://cr.openjdk.java.net/~ykantser/8007142/webrev.01/ with following fixes compared to .00:

* new line is added at the end of the StreamPumper.java
* <code> is changed to {@code in the StreamPumper.java
* JDKToolFinder.java will use the system property "java.home" instead of "test.jdk" (thus -compilejdk problem is solved)
I see you've changed the package to jdk.testlibrary - thanks for doing that.

Ops, I've forgotten to mention it. Thanks for pointing on it.
On JDKToolFinder and finding the path to jcmd or other tools used by the test then it really depends what you are testing. What you have is fine when testing a JDK but it's not going to work when testing a JRE (runtime only, no tools). When testing a runtime then jtreg needs to invoked the -jdk and -compilejdk options (the latter being the JDK to use to compile the tests). So I think the right answer for JDKToolFinder is to use "compile.jdk". That will work when testing a JDK too as "compile.jdk" and "test.jdk" are set to the same value for that case.

I've done some testing before I've changed JDKToolFinder. Bellow are 2 cases:

1) *compile.jdk != test.jdk*
./build/linux-amd64/j2sdk-image/bin/java -jar jtreg.jar -compilejdk /localhome/java/jdk1.7.0_09 test.java

test.jdk=../build/linux-amd64/j2sdk-image/jre
compile.jdk=/localhome/java/jdk1.7.0_09
java.home=../build/linux-amd64/j2sdk-image/jre

2) *compile.jdk == test.jdk*
./build/linux-amd64/j2sdk-image/bin/java -jar jtreg.jar -jdk|-testjdk /localhome/java/jdk1.7.0_09 test.java

test.jdk /localhome/java/jdk1.7.0_09
compile.jdk /localhome/java/jdk1.7.0_09
java.home /localhome/java/jdk1.7.0_09/jre

It seems like test.jdk is always equal to java.home (besides /jre part). Are there some rules how -jdk and -compilejdk should be used?


-Alan

Thanks,
Katja

Reply via email to