You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "J. Matthew Pryor" <ma...@versata.com> on 2001/08/20 20:34:06 UTC

junit.batchtest directory existence check

Hello Stephane,

Not sure about the best place to report this, be sure and let me know if
there is somewhere better

Anyway I an using Ant 1.4 beta (with optional tasks) and I just spent quite
a while tracking down a subtle "bug" sort of.

Anyway if I use batchtest in the form :

    <junit printsummary="yes" haltonfailure="no" dir="${test.data.dir}">
        <classpath>
                <path refid="${param.test.classpath}"/>
                <path location="${build.classes.dir}"/>
                <path location="${test.data.dir}"/>
        </classpath>

        <batchtest fork="yes" todir="${param.test.result.dir}">
            <formatter type="xml" />
            <fileset dir="${param.test.classes.dir}">
                <patternset refid="test.classes" />
            </fileset>
        </batchtest>
    </junit>


and the directory ${test.data.dir} does not exist, the build fails with a
very obscure Win32 can't create process error

Now that I know why (i.e. the directory wasn't there, which definitely is my
fault and a stupid error) I can understand the error code, but perhaps to
save other careless people like myself, if would be nice for JUnit to test
for the existence of the nominated directory, since the OS level error is
very unhelpful

Anyway this is probably at least half a feature request, but a simple one I
guess. Hope you don't mind me emailing you directly

I did check the ant-user archives for a similar report, but couldn't find
one (doesn't mean it isn't there)

Cheers,
Matthew