view build.xml @ 14:b5b31085de22

run-tests target added
author Pavel.Sher
date Tue, 15 Jul 2008 21:59:08 +0400
parents c05869fe20af
children afcb3eee8fc6
line wrap: on
line source
<project name="Mercurial VCS Support" default="dist" basedir=".">
  <property file="mercurial.properties"/>
  <import file="mercurial.xml"/>

  <property name="distPath" value="${basedir}/dist"/>

  <target name="dist" depends="clean, init, compile.module.mercurial.production">
    <mkdir dir="${distPath}/unpacked"/>
    <jar destfile="${distPath}/unpacked/mercurial.jar" basedir="${mercurial.output.dir}"/>
    <zip basedir="${distPath}/unpacked" destfile="${distPath}/mercurial.zip" includes="**/*"/>
  </target>

  <taskdef name="testng" classname="org.testng.TestNGAntTask" classpath="${basedir}/mercurial-tests/lib/testng-5.7-jdk15.jar"/>

  <target name="run-tests" depends="clean, init, compile.module.mercurial-tests.production">

    <testng haltonfailure="no" failureProperty="failure_found" listener="org.testng.reporters.TestHTMLReporter"
            outputdir="${basedir}/test-output" classpathref="mercurial-tests.runtime.module.classpath" dumpcommand="true">

      <jvmarg value="-ea"/>

      <sysproperty key="java.awt.headless" value="true"/>

      <xmlfileset dir="${basedir}/mercurial-tests/src">
        <include name="testng.xml"/>
      </xmlfileset>
    </testng>
  </target>
</project>