liblinphone_tester: do not retrieve xml result file if crash occured
This commit is contained in:
parent
e66022b1dc
commit
375eec05ac
1 changed files with 20 additions and 17 deletions
|
@ -14,8 +14,7 @@
|
||||||
<target name="test">
|
<target name="test">
|
||||||
<property name="output.file" value="./tests.output" />
|
<property name="output.file" value="./tests.output" />
|
||||||
<tstamp>
|
<tstamp>
|
||||||
<format property="archive.name"
|
<format property="archive.name" pattern="'liblinphonetester_'yyyyMMdd_HHmmss" />
|
||||||
pattern="'liblinphonetester_'yyyyMMdd_HHmmss" />
|
|
||||||
</tstamp>
|
</tstamp>
|
||||||
<echo>Adb log files are put in ${archive.name}.zip</echo>
|
<echo>Adb log files are put in ${archive.name}.zip</echo>
|
||||||
|
|
||||||
|
@ -37,25 +36,29 @@
|
||||||
<arg value="-c" />
|
<arg value="-c" />
|
||||||
<arg value="kill `cat adb.pid`" />
|
<arg value="kill `cat adb.pid`" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="bash">
|
|
||||||
<arg value="-c"/>
|
|
||||||
<arg value="adb shell run-as org.linphone.tester cat /data/data/org.linphone.tester/files/junit-report.xml > liblinphone-junit-report.xml"/>
|
|
||||||
</exec>
|
|
||||||
<zip destfile="${archive.name}.zip">
|
|
||||||
<fileset dir="." includes="${archive.name}"/>
|
|
||||||
</zip>
|
|
||||||
<fail message="Tests failed">
|
|
||||||
<condition>
|
|
||||||
<resourcecontains resource="${output.file}" substring="FAILURES" />
|
|
||||||
</condition>
|
|
||||||
</fail>
|
|
||||||
<condition property="has.crashed" >
|
<condition property="has.crashed" >
|
||||||
<or>
|
<or>
|
||||||
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
||||||
<resourcecontains resource="${output.file}" substring="Native crash" />
|
<resourcecontains resource="${output.file}" substring="Native crash" />
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
|
<exec executable="bash" unless:set="has.crashed">
|
||||||
|
<arg value="-c"/>
|
||||||
|
<arg value="adb shell run-as org.linphone.tester cat /data/data/org.linphone.tester/files/junit-report.xml > liblinphone-junit-report.xml"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<zip destfile="${archive.name}.zip">
|
||||||
|
<fileset dir="." includes="${archive.name}"/>
|
||||||
|
</zip>
|
||||||
|
|
||||||
<antcall target="check-for-crash"/>
|
<antcall target="check-for-crash"/>
|
||||||
|
|
||||||
|
<fail message="Tests failed">
|
||||||
|
<condition>
|
||||||
|
<resourcecontains resource="${output.file}" substring="FAILURES" />
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
|
||||||
<delete file="${archive.name}"/>
|
<delete file="${archive.name}"/>
|
||||||
<delete file="${output.file}"/>
|
<delete file="${output.file}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
Loading…
Reference in a new issue