|
@@ -6,6 +6,7 @@
|
6
|
6
|
<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
|
7
|
7
|
<taskdef resource="cloverjunitlib.xml" classpath="${clover.jar}"/>
|
8
|
8
|
<available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
|
|
9
|
+ <available file="/usr/bin/xvfb-run" property="has.xvfb"/>
|
9
|
10
|
|
10
|
11
|
<target name="with.clover" depends="clean" if="clover.installed"
|
11
|
12
|
description="Set up Clover to instrument tests.">
|
|
@@ -57,6 +58,35 @@
|
57
|
58
|
</junitreport>
|
58
|
59
|
</target>
|
59
|
60
|
|
|
61
|
+ <target name="test" depends="check-use-xvfb, -test-xvfb, -test-no-xvfb"/>
|
|
62
|
+
|
|
63
|
+ <target name="check-use-xvfb">
|
|
64
|
+ <condition property="use.xvfb">
|
|
65
|
+ <and>
|
|
66
|
+ <not>
|
|
67
|
+ <equals arg1="${xvfb.disable}" arg2="true" />
|
|
68
|
+ </not>
|
|
69
|
+ <equals arg1="${has.xvfb}" arg2="true" />
|
|
70
|
+ </and>
|
|
71
|
+ </condition>
|
|
72
|
+ </target>
|
|
73
|
+
|
|
74
|
+ <target name="-test-xvfb" if="use.xvfb">
|
|
75
|
+ <exec executable="/usr/bin/xvfb-run">
|
|
76
|
+ <arg value="-a"/>
|
|
77
|
+ <arg value="-s"/>
|
|
78
|
+ <arg value="-screen 0 1280x1024x24"/>
|
|
79
|
+ <arg value="-w"/>
|
|
80
|
+ <arg value="-5"/>
|
|
81
|
+ <arg value="/usr/bin/ant"/>
|
|
82
|
+ <arg value="do-real-test"/>
|
|
83
|
+ </exec>
|
|
84
|
+ </target>
|
|
85
|
+
|
|
86
|
+ <target name="-test-no-xvfb" unless="use.xvfb">
|
|
87
|
+ <antcall target="do-real-test"/>
|
|
88
|
+ </target>
|
|
89
|
+
|
60
|
90
|
<target name="test-html" depends="with.clover,compile-test,test,clover.html,clover.snapshot"
|
61
|
91
|
description="Run tests and generate a Clover HTML report."/>
|
62
|
92
|
<target name="test-xml" depends="with.clover,compile-test,test,clover.xml,clover.snapshot"
|