ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: errors running the ant test suite on Windows
Date Tue, 02 Mar 2010 16:06:29 GMT
On 2010-03-02, Stefan Bodewig <> wrote:

> On 2010-03-02, Antoine Levy Lambert <> wrote:

>>    [junit] Testcase:
>> testDifferentWindowsDrive(

> Fails for me as well when using JDK 1.6 but not when using JDK 1.4 - I'm
> currently running the full testsuite with 1.6 to see whether there is
> anything else.

No, only the usual jspc errors that I see with 1.4 as well.

> It shouldn't matter whether there is any drive in D: or not, the test
> is supposed to see it cannot create a relative path from a file on C:
> to a drive on D: - no matter what those drives are.

That's wrong.  It uses getCanonicalPath and Windows may throw an
exception if you try this for a file on a drive that is not ready.

Because of this the test contains a guard

            try {
            } catch ( e) {
                System.out.println("drive d: doesn't exist or is not ready,"
                                   + " skipping test");

which is triggered on Java 1.4.1 but not on Java 1.6.

If you insert a CD the test will pass.

I've modified the guard to actually try a file on the disk and it works
for 1.4.1 and 1.6 - and the test is not skipped and passes if you insert
a CD on both JDKs.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message