diff options
Diffstat (limited to 'tests/build.xml')
| -rw-r--r-- | tests/build.xml | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/build.xml b/tests/build.xml index b5596c3..2afa27b 100644 --- a/tests/build.xml +++ b/tests/build.xml @@ -45,6 +45,26 @@ unless="sdk.dir"
/>
+ <target name="run-acceptance-tests" depends="clean, debug, install" >
+
+ <property name="log.file" value="acceptance_tests_standard_out.txt" />
+ <!-- because we don't have control over the 'test' target (to check for passes an fails) this prints to standard out
+ we capture standard out into a file and query this to see if we have any test failures, using this to pass/fail our task -->
+ <record name="${log.file}" action="start" />
+ <antcall target="test" />
+ <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>Acceptance tests passed!</echo>
+ </target>
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
@@ -79,7 +99,7 @@ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
- <!-- version-tag: 1 -->
+ <!-- version-tag: custom -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>
|
