<project default="run.tests">

    <target name="check.abHome-1">
        <condition property="abHomeSet">
            <not>
                <equals arg1="${ABHOME}" arg2=""/>
            </not>
        </condition>
    </target>

    <target name="check.abHome" depends="check.abHome-1" unless="abHomeSet">
        <fail message="ABHOME is not set... set it to IA installation directory..."/>
    </target>

    <target name="run.tests">
        <echo message="Running ErrorDisplay tests ..."/>
        <mkdir dir="${ABHOME}/log"/>
        <junit fork="yes" newenvironment="yes" showoutput="yes" jvm="${ABHOME}/java/bin/java.exe" failureproperty="junitfailed" printsummary="on">
            <classpath>
                <pathelement path="${ABHOME}/config"/>
                <fileset dir="${ABHOME}/lib" casesensitive="no">
                    <include name="coregui.jar"/>
                    <include name="error-display.jar"/>
                    <include name="error-displayTest.jar"/>
                </fileset>
                <fileset dir="${ABHOME}/lib/junit" casesensitive="no">
                    <include name="jfcunit.jar"/>
                    <include name="jakarta-regexp-1.2.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="user.bin" value="${ABHOME}\bin"/>
            <sysproperty key="java.library.path" value="${ABHOME}\bin"/>
            <sysproperty key="user.dir" value="${ABHOME}\config"/>
            <formatter type="xml"/>
            <test name="com.apldbio.core.error.display.test.ErrorDisplayUITest" todir="${ABHOME}/log" outfile="AutoTestErrorDisplayResults"/>
        </junit>
    </target>
</project>
