-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-junit.xml
46 lines (42 loc) · 1.85 KB
/
build-junit.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8"?>
<project name="boost-junit" default="ignore" basedir=".">
<import file="build-init.xml"/>
<property name="test.report.dir" location="${reports.dir}/test"/>
<macrodef name="macro_junit_run">
<attribute name="tests.refid"/>
<attribute name="classpath.refid"/>
<attribute name="test.type"/>
<attribute name="failure.property"/>
<sequential>
<mkdir dir="${test.report.dir}/@{test.type}/xml"/>
<junit fork="true" forkmode="perBatch" showoutput="true" printSummary="true" haltonfailure="false"
failureproperty="@{failure.property}">
<sysproperty key="net.sourceforge.cobertura.datafile"
file="${cobertura.dir}/@{test.type}_coverage.ser"/>
<classpath refid="@{classpath.refid}"/>
<formatter type="xml"/>
<formatter type="plain"/>
<batchtest todir="${test.report.dir}/@{test.type}/xml">
<fileset refid="@{tests.refid}"/>
</batchtest>
</junit>
</sequential>
</macrodef>
<macrodef name="macro_junit_report">
<attribute name="test.type"/>
<sequential>
<junitreport todir="${test.report.dir}" tofile="TestReport.xml">
<fileset dir="${test.report.dir}/@{test.type}/xml">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${test.report.dir}/@{test.type}"/>
</junitreport>
</sequential>
</macrodef>
<macrodef name="macro_junit_check">
<attribute name="failure.property"/>
<sequential>
<fail if="@{failure.property}" message="One or more tests failed [@{failure.property}]."/>
</sequential>
</macrodef>
</project>