1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <project name="build-emma" basedir="." default="...">
- <!-- directory that contains emma.jar and emma_ant.jar: -->
-
- <property name="emma.output.dir" location="emma" />
- <property name="emma.instrumented.classes.dir" location="${emma.output.dir}/classes-instrumented" />
- <path id="emma.lib" >
- <pathelement location="${emma.home}/lib/emma.jar" />
- <pathelement location="${emma.home}/lib/emma_ant.jar" />
- </path>
- <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
- <target name="tests.before">
- <emma>
- <instr
- outdir="${emma.instrumented.classes.dir}"
- instrpath="${dest.dir}"
- metadatafile="${emma.output.dir}/coverage.em"
- merge="no">
- </instr>
- </emma>
- </target>
- <target name="init.emma">
- <mkdir dir="${emma.output.dir}"/>
- </target>
- <target name="clean.emma">
- <delete dir="${emma.output.dir}"/>
- </target>
- <path id="tests.run.classpath">
- <pathelement location="${emma.instrumented.classes.dir}"/>
- <path refid="tests.run.classpath.base"/>
- <path refid="emma.lib"/>
- </path>
- <target name="emma">
- <property name="tests.run.classpath.ref" value="tests.run.classpath.emma"/>
- </target>
- <target name="tests.after">
- <emma>
- <report sourcepath="${src.main.java.dir}"
- sort="+block,+name,+method,+class"
- metrics="method:70,block:80,line:80,class:100"
- >
- <infileset dir="${emma.output.dir}" includes="*.em, *.ec" />
- <html outfile="${emma.output.dir}/report/index.html" encoding="UTF-8"/>
- </report>
- </emma>
- </target>
- <target name="emma.do" depends="emma,tests.run"/>
- <presetdef name="junit.orion">
- <junit>
- <sysproperty key="emma.coverage.out.file" value="${emma.output.dir}/coverage.ec"/>
- </junit>
- </presetdef>
- </project>
|