| <project name="testing-UGLI" default="build.core" basedir="." > |
| |
| <!-- The directory where source files are stored. --> |
| <property name="tests.source.home" value="./src/java/"/> |
| |
| <!-- The directory where source files are stored. --> |
| <property name="version" value="1.0alpha"/> |
| |
| <!-- Deprecation warning? --> |
| <property name="deprecation" value="on"/> |
| |
| <!-- Destination for compiled files --> |
| <property name="javac.dest" value="classes"/> |
| |
| |
| <path id="basic.classpath"> |
| <pathelement location="${tests.source.home}"/> |
| <pathelement location="${javac.dest}"/> |
| <pathelement location="${jakarta-oro.jar}"/> |
| </path> |
| |
| <path id="compile.classpath"> |
| <path refid="basic.classpath"/> |
| <pathelement location="../ugli-nop.jar"/> |
| </path> |
| |
| <path id="nop.classpath"> |
| <path refid="basic.classpath"/> |
| <pathelement location="../ugli-nop.jar"/> |
| </path> |
| |
| <path id="simple.classpath"> |
| <path refid="basic.classpath"/> |
| <pathelement location="../ugli-simple.jar"/> |
| </path> |
| |
| <path id="jdk14.classpath"> |
| <path refid="basic.classpath"/> |
| <pathelement location="../ugli-jdk14.jar"/> |
| </path> |
| |
| <path id="log4j.classpath"> |
| <path refid="basic.classpath"/> |
| <fileset dir=".."> |
| <include name="log4j-*.jar"/> |
| </fileset> |
| </path> |
| |
| |
| |
| <!-- ================================================================= --> |
| <!-- Default target --> |
| <!-- ================================================================= --> |
| <target name="usage"> |
| <echo> |
| These are some of the targets supported by this ANT build scpript: |
| |
| build - compile all project files, if a certain library is missing, |
| then the compilation of its dependents are skipped. |
| |
| runAll - run all available tests |
| |
| </echo> |
| </target> |
| |
| <target name="siblingBuild"> |
| <ant antfile="build.xml" target="build"/> |
| </target> |
| |
| |
| <target name="build" depends="siblingBuild"> |
| <javac srcdir="${tests.source.home}" |
| destdir="${javac.dest}" |
| includes="${stem}/ugli/**.java" |
| deprecation="${deprecation}" |
| debug="on"> |
| <classpath refid="compile.classpath"/> |
| </javac> |
| </target> |
| |
| |
| <target name="cleanOutputDir"> |
| <ant antfile="build.xml" target="cleanOutputDir"/> |
| </target> |
| |
| <target name="ugli-nop.jar"> |
| <!-- Invoke ugli.xml located one directory up --> |
| <ant dir=".." antfile="ugli.xml" target="ugli-nop.jar"/> |
| </target> |
| |
| <target name="ugli-simple.jar"> |
| <!-- Invoke ugli.xml located one directory up --> |
| <ant dir=".." antfile="ugli.xml" target="ugli-simple.jar"/> |
| </target> |
| |
| <target name="ugli-jdk14.jar"> |
| <ant dir=".." antfile="ugli.xml" target="ugli-jdk14.jar"/> |
| </target> |
| |
| <target name="log4j.jar"> |
| <!-- The main build is big enough to have its own properties --> |
| <ant dir=".." antfile="build.xml" target="log4j.jar" inheritAll="false"/> |
| </target> |
| |
| <!-- ================================================================= --> |
| <!-- Run all tests --> |
| <!-- ================================================================= --> |
| <target name="runAll" depends="regression"/> |
| |
| <!-- ================================================================= --> |
| <!-- Tests multiple parts of log4j. These tests are much more fragile --> |
| <!-- unit tests. Regression tests compare output with a previously --> |
| <!-- created witness file. --> |
| <!-- ================================================================= --> |
| <target name="regression" depends="MessageFormatter, |
| InvokeNOP, |
| InvokeSimple, |
| InvokeJDK14" |
| /> |
| |
| <target name="MessageFormatter" depends="build, cleanOutputDir"> |
| <junit printsummary="yes" fork="yes" haltonfailure="yes"> |
| <classpath refid="compile.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <test name="org.apache.ugli.impl.MessageFormatterTest" /> |
| </junit> |
| </target> |
| |
| <target name="InvokeNOP" depends="build, ugli-nop.jar, cleanOutputDir"> |
| <junit printsummary="yes" fork="yes" haltonfailure="yes"> |
| <classpath refid="nop.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <test name="org.apache.ugli.InvokingUGLI" /> |
| </junit> |
| </target> |
| |
| <target name="InvokeSimple" depends="build, ugli-simple.jar, cleanOutputDir"> |
| <junit printsummary="yes" fork="yes" haltonfailure="yes"> |
| <classpath refid="simple.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <test name="org.apache.ugli.InvokingUGLI" /> |
| </junit> |
| </target> |
| |
| <target name="InvokeJDK14" depends="build, ugli-jdk14.jar, cleanOutputDir"> |
| <junit printsummary="yes" fork="yes" haltonfailure="yes"> |
| <classpath refid="jdk14.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <test name="org.apache.ugli.InvokingUGLI" /> |
| </junit> |
| </target> |
| |
| |
| <target name="InvokeLog4j" depends="build, log4j.jar, cleanOutputDir"> |
| |
| <copy file="input/ugli/basic.xml" tofile="${javac.dest}/log4j.xml"/> |
| |
| <junit printsummary="yes" fork="yes" haltonfailure="yes"> |
| <classpath refid="log4j.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <test name="org.apache.ugli.InvokingUGLI" /> |
| </junit> |
| |
| <delete file="${javac.dest}/log4j.xml"/> |
| |
| </target> |
| |
| |
| </project> |