On 02/01/2013 03:20 PM, Alan Bateman wrote:
On 01/02/2013 13:32, Yekaterina Kantserova wrote:

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?
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.

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.

Reply via email to