(original) (raw)
On 02/01/2013 03:20 PM, Alan Bateman wrote:On 01/02/2013 13:32, Yekaterina Kantserova wrote:Normally you specify the JDK/JRE to test via the -jdk option. When you only specify -jdk then you will see that test.jdk and compile.jdk have the same value.
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?
When testing a JRE then you need to specify both -jdk and \-compilejdk, the latter being the JDK to use to compile the tests. In that scenario you will see that test.jdk and compile.jdk are different (as expected).
Thanks for explanation! But I'm still confused.
In my use case I need to test \_the tool\_ I'll find with JDKToolFinder. It will work if just -jdk will be specified. But if \-compilejdk happens to be specified the results of my tests will be useless. Furthermore, it would be hard to detect. Do you think there is a solution that covers all use cases?
// Katja
\-Alan.