Log tester output in real time instead of only on tests' end to avoid buiildbot's timeouts
This commit is contained in:
parent
e5c88aaaf5
commit
9b4d661b84
1 changed files with 10 additions and 10 deletions
|
@ -12,24 +12,24 @@
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="test">
|
<target name="test">
|
||||||
<exec executable="adb" failonerror="true" outputproperty="tests.output">
|
<property name="output.file" value="./tests.output" />
|
||||||
<arg value="shell" />
|
<exec executable="bash" failonerror="true">
|
||||||
<arg value="am" />
|
<arg value="-c"/>
|
||||||
<arg value="instrument" />
|
<!-- use 'tee' command to write in file AND on stdout.
|
||||||
<arg value="-r" />
|
First is used below to check if tests failed or not while second
|
||||||
<arg value="-w" />
|
is used to get output in real time -->
|
||||||
<arg value="org.linphone.tester/org.linphone.tester.TestRunner" />
|
<arg value="adb shell am instrument -r -w org.linphone.tester/org.linphone.tester.TestRunner | tee ${output.file}"/>
|
||||||
</exec>
|
</exec>
|
||||||
<echo message="${tests.output}"/>
|
|
||||||
<fail message="Tests failed">
|
<fail message="Tests failed">
|
||||||
<condition>
|
<condition>
|
||||||
<contains string="${tests.output}" substring="FAILURES" />
|
<resourcecontains resource="${output.file}" substring="FAILURES" />
|
||||||
</condition>
|
</condition>
|
||||||
</fail>
|
</fail>
|
||||||
<fail message="Tests crashed">
|
<fail message="Tests crashed">
|
||||||
<condition>
|
<condition>
|
||||||
<contains string="${tests.output}" substring="Process crashed" />
|
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
||||||
</condition>
|
</condition>
|
||||||
</fail>
|
</fail>
|
||||||
|
<delete file="${output.file}"/>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in a new issue