Fabian Ritzmann wrote:
>> None of us have Macs except you, so we need your help to get more info.
>
> Isn't that the perfect excuse to get yourself a Mac. :-)
Tell that to Vella, please.
>> 1. Please tell us what's your:
>> System.out.println(System.getProperty("java.home"));
>
> /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
>
>> 2. Please tell us where's your tools.jar, relative to java.home.
>
> $ find /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
> -follow -name tools.jar
> $
>
> So much about depending on implementation details... :-)
I know. The good news is in Mustang this is fixed.
> There seems to be a classes.jar that contains all com.sun and java/javax
> classes. You can find it in $JAVA_HOME/../Classes/classes.jar.
Ca you check if it contain javac? But then you say it contains all
java/javax classes. Is this the equivalent of rt.jar in Unix/Windows? If
so, it should be in the bootstrap classloader, so all we need to do is
to relax the error check a bit.
Does that mean in Mac every JRE comes with javac?
>>> Can't we run all tests and then return with a non-0 exit code if
>>> anything failed?
>>
>> That's exactly what we are doing right now. The consequence is that
>> the build script cannot set failonerror="true", because that would
>> kill the build as long as any test fail.
>>
>> The discussion in this thread was that you don't want that to happen,
>> but you do want the build to break if there's a catastrophic errors in
>> running a test, like this one.
>>
>> So I suggested that we only return non-0 when there's a catastrophic
>> failures.
>
> Yes, that makes sense. Or could we do it such that the harness returns
> an error code if there had been a fatal failure or a test failure, then
> we run the junitreport task and only after that we fail? Something along
> these lines:
>
> <java jar="${test.lib.dir}/harness.jar" fork="true"
> resultproperty="test.returncode"/>
> ..
> <junitreport/>
> ..
> <condition property="test.failed">
> <not>
> <equals arg1="0" arg2="test.returncode"/>
> </not>
> </condition>
> <fail if="test.failed/>
That could work, too, but with this approach, a catastrophic failure
would show up with "no test failure" --- it's just that there was no
test, but I think it could be confusing.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com