don't clean up emma files, incase they are useful

pull/14/head
Tim Su 12 years ago
parent d6d11e1da0
commit f5def03ca7

@ -54,28 +54,6 @@
</copy>
</target>
<target name="test"
description="Runs the tests generates junit report">
<property name="tested.project.absolute.dir" location="${tested.project.dir}" />
<property name="test.runner" value="com.zutubi.android.junitreport.JUnitReportTestRunner" />
<!-- Application package of the tested project extracted from its manifest file -->
<xpath input="${tested.project.absolute.dir}/AndroidManifest.xml"
expression="/manifest/@package" output="tested.manifest.package" />
<xpath input="AndroidManifest.xml"
expression="/manifest/@package" output="manifest.package" />
<run-tests-helper>
</run-tests-helper>
<property name="tested.project.absolute.dir" location="${tested.project.dir}" />
<xpath input="${tested.project.absolute.dir}/AndroidManifest.xml"
expression="/manifest/@package" output="tested.manifest.package" />
<antcall target="pull-junit" />
</target>
<!-- override coverage target with custom reporting and rules -->
<target name="coverage"
description="Runs the tests against the instrumented code and generates emma code coverage report">
@ -90,10 +68,15 @@
expression="/manifest/@package" output="manifest.package" />
<property name="emma.dump.file"
value="/data/data/${tested.manifest.package}/coverage.ec" />
value="/sdcard/coverage.ec" />
<property name="junit.dump.dir"
value="/sdcard" />
<run-tests-helper emma.enabled="true">
<extra-instrument-args>
<arg value="-e" />
<arg value="reportDir" />
<arg value="${junit.dump.dir}" />
<arg value="-e" />
<arg value="coverageFile" />
<arg value="${emma.dump.file}" />
@ -109,8 +92,6 @@
<echo>Downloading coverage file into project directory...</echo>
<property name="emma.dump.file"
value="/data/data/${tested.manifest.package}/coverage.ec" />
<exec executable="${adb}" failonerror="true">
<arg line="${adb.device.arg}" />
<arg value="pull" />
@ -118,15 +99,15 @@
<arg value="coverage.ec" />
</exec>
<antcall target="emma-parse" />
<antcall target="pull-junit" />
<antcall target="emma-parse" />
<antcall target="pull-junit" />
</target>
<target name="emma-parse" depends="-test-project-check">
<echo>Extracting coverage report...</echo>
<copy todir="${tested.project.absolute.dir}/src-combined">
<fileset dir="../api/src" includes="**/*.java" />
</copy>
</copy>
<mkdir dir="${reports.dir}" />
<emma>
<report sourcepath="${tested.project.absolute.dir}/src-combined"
@ -140,8 +121,6 @@
</report>
</emma>
<echo>Cleaning up temporary files...</echo>
<delete file="coverage.ec" />
<delete file="coverage.em" />
<echo>Saving the report file in ${basedir}/coverage/coverage.html</echo>
</target>
@ -150,7 +129,7 @@
<exec executable="${adb}" failonerror="true">
<arg line="${adb.device.arg}"/>
<arg value="pull" />
<arg value="/sdcard/Android/data/${tested.manifest.package}/files/junit-report.xml" />
<arg value="${junit.dump.dir}/junit-report.xml" />
<arg value="${reports.dir}/junit-report.xml" />
</exec>
</target>

Loading…
Cancel
Save