Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <!-- ********************************************************* -->
- <!-- ** Tests ** -->
- <!-- ** ** -->
- <!-- ** @author Jeff Rafter ** -->
- <!-- ** @version 0.1 ** -->
- <!-- ********************************************************* -->
- <project name="sync" default="test">
- <property name="lib.dir" location="../lib" />
- <property name="build.dir" location="../build" />
- <property name="dist.dir" location="../dist" />
- <property name="test.dir" location="build" />
- <property name="lib-common.dir" location="../lib-common" />
- <available file="../lib-common" type="dir" property="lib-common.present"/>
- <target name="test-default" unless="lib-common.present">
- <path id="classpath">
- <pathelement location="${test.dir}"/>
- <pathelement location="${build.dir}"/>
- <pathelement location="${dist.dir}"/>
- <fileset dir="${lib.dir}">
- <include name="**/*.jar" />
- </fileset>
- </path>
- </target>
- <target name="test-common" if="lib-common.present">
- <path id="classpath">
- <pathelement location="${test.dir}"/>
- <pathelement location="${build.dir}"/>
- <pathelement location="${dist.dir}"/>
- <fileset dir="${lib.dir}">
- <include name="**/*.jar" />
- </fileset>
- <fileset id="lib-common.files" dir="${lib-common.dir}">
- <include name="**/*.jar" />
- </fileset>
- </path>
- </target>
- <target name="test-clean">
- <!-- Clean out the old test class build area -->
- <delete dir="build" />
- </target>
- <target name="test-build" depends="test-default,test-common" >
- <!-- Setup the new test target -->
- <mkdir dir="build" />
- <!-- Copy over the log4j.xml so that it is used -->
- <copy todir="build/">
- <fileset dir="metadata/" includes="**/*" />
- </copy>
- <!-- Compile the tests -->
- <javac destdir="build" debug="true" debuglevel="lines,source,vars">
- <classpath refid="classpath" />
- <src path="." />
- <include name="**/*.java" />
- </javac>
- </target>
- <target name="test" depends="test-default,test-common,test-clean,test-build" >
- <!-- Run the units -->
- <junit printsummary="true" haltonfailure="false" failureProperty="test.failure">
- <!-- formatter type="plain" usefile="false"/ -->
- <classpath refid="classpath" />
- <!-- ant test -Dtestcase=<fully qualified classname> -->
- <test name="${testcase}" if="testcase"/>
- <batchtest fork="no" unless="testcase">
- <fileset dir="build">
- <include name="**/*Test.class"/>
- <exclude name="**/*BaseTest*" />
- <exclude name="**/*TestHelper*" />
- </fileset>
- </batchtest>
- </junit>
- <!-- Fail the ant build if a test failed -->
- <fail message="test failed" if="test.failure" />
- </target>
- </project>
Add Comment
Please, Sign In to add comment