1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
<?xml version="1.0"?>
<!-- Fichier Ant du projet Octopuss -->
<project name="Octopuss" default="main-tests" basedir=".">
<property file="build.properties"/>
<path id="libs.classpath.path">
<fileset dir="${source.libs.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${deploy.dir}"></delete>
</target>
<target name="clean-tests">
<delete dir="${deploy.junit.dir}"></delete>
</target>
<target name="init" depends="clean">
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${deploy.conf.dir}"/>
<mkdir dir="${deploy.web.dir}"/>
<mkdir dir="${deploy.libs.dir}"/>
<mkdir dir="${deploy.class.dir}"/>
</target>
<target name="init-tests" depends="clean-tests">
<mkdir dir="${deploy.junit.dir}"/>
<mkdir dir="${deploy.junit.reports}"/>
</target>
<target name="compile-all-junit-tests" depends="init-tests">
<javac srcdir="${source.java.dir}"
destdir="${deploy.junit.dir}">
<classpath refid="libs.classpath.path"/>
<include name="${package.junit}/**"/>
</javac>
</target>
<target name="generate_junit_tests_reports" depends="compile-all-junit-tests">
<junit printsummary="yes" haltonfailure="no" haltonerror="no">
<formatter type="plain"/>
<classpath>
<pathelement location="${deploy.junit.dir}"/>
<path refid="libs.classpath.path"/>
</classpath>
<test name="com.automne.junit.log4j.AllTests" toDir="${deploy.junit.reports}"/>
</junit>
</target>
<target name="send_junit_report_by_mail" depends="generate_junit_tests_reports">
<mail mailhost="smtp.free.fr" encoding="plain" subject="[Automne-Dev]Tests Junit d'Octopuss">
<from address="okimimi@free.fr"/>
<to address="okimimi@free.fr"/>
<message>Les tests unitaires de l'application Octopuss ont ete accomplis. En voici le rapport : </message>
<fileset dir="${deploy.junit.reports}">
<include name="**/*.txt"/>
</fileset>
</mail>
</target>
<target name="main-tests" depends="send_junit_report_by_mail"/>
<target name="main" depends="init"/>
</project> |
Partager