mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
35 lines
1.1 KiB
XML
35 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="custom_rules">
|
|
<target name="run">
|
|
<exec executable="adb">
|
|
<arg value="shell" />
|
|
<arg value="am" />
|
|
<arg value="start" />
|
|
<arg value="-a" />
|
|
<arg value="android.intent.action.MAIN" />
|
|
<arg value="-n" />
|
|
<arg value="org.linphone.tester/org.linphone.tester.MainActivity" />
|
|
</exec>
|
|
</target>
|
|
<target name="test">
|
|
<property name="output.file" value="./tests.output" />
|
|
<exec executable="bash" failonerror="true">
|
|
<arg value="-c"/>
|
|
<!-- use 'tee' command to write in file AND on stdout.
|
|
First is used below to check if tests failed or not while second
|
|
is used to get output in real time -->
|
|
<arg value="adb shell am instrument -r -w org.linphone.tester/org.linphone.tester.TestRunner | tee ${output.file}"/>
|
|
</exec>
|
|
<fail message="Tests failed">
|
|
<condition>
|
|
<resourcecontains resource="${output.file}" substring="FAILURES" />
|
|
</condition>
|
|
</fail>
|
|
<fail message="Tests crashed">
|
|
<condition>
|
|
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
|
</condition>
|
|
</fail>
|
|
<delete file="${output.file}"/>
|
|
</target>
|
|
</project>
|