1
0
mirror of https://github.com/owncloud/android-library.git synced 2026-08-11 16:33:03 +00:00

Updated ant rules to finish with a failure when a run test is not successful; and enforced failure of DownloadTest, to validate

This commit is contained in:
David A. Velasco
2014-04-22 10:38:28 +02:00
parent 35f5ae5147
commit b7dc13e180
2 changed files with 21 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
<!-- Run regular Android target 'test', but fails if any test is not successful -->
<target name="acceptance-test" depends="clean, debug, install" >
<property name="log.file" value="tests_output.txt" />
<record name="${log.file}" action="start" />
<antcall target="test" /> <!-- regular Android target -->
<record name="${log.file}" action="stop" />
<loadfile property="tests.output" srcFile="${log.file}" />
<echo>Checking for failures</echo>
<fail message="Acceptance tests failed." >
<condition>
<contains string="${tests.output}" substring="FAILURES" />
</condition>
</fail>
<echo>All tests passed.</echo>
</target>
</project>