improve error reporting in case of crashes during liblinphoner test
This commit is contained in:
parent
62364f7e0a
commit
e963745884
1 changed files with 16 additions and 6 deletions
|
@ -37,17 +37,27 @@
|
|||
<zip destfile="${archive.name}.zip">
|
||||
<fileset dir="." includes="${archive.name}"/>
|
||||
</zip>
|
||||
<delete file="${archive.name}"/>
|
||||
<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>
|
||||
<condition property="has.crashed" value="true" else="false">
|
||||
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
||||
</condition>
|
||||
<antcall target="test-crashed"/>
|
||||
<delete file="${archive.name}"/>
|
||||
<delete file="${output.file}"/>
|
||||
</target>
|
||||
<target name="test-crashed" if="has.crashed">
|
||||
<exec executable="bash" >
|
||||
<arg value="-c" />
|
||||
<arg value="tail -n 500 ${archive.name}" />
|
||||
</exec>
|
||||
<exec executable="bash" >
|
||||
<arg value="-c" />
|
||||
<arg value="cat ${archive.name} |ndk-stack -sym obj/local/`adb shell getprop ro.product.cpu.abi`" />
|
||||
</exec>
|
||||
<fail message="Tests crashed"/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
Loading…
Reference in a new issue