Przeglądaj źródła

Add clover


git-svn-id: http://svn.dmdirc.com/trunk@3243 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Shane Mc Cormack 16 lat temu
rodzic
commit
ce04c5d751
3 zmienionych plików z 27 dodań i 20 usunięć
  1. 4
    2
      build.xml
  2. 20
    18
      junitreport.xml
  3. 3
    0
      nbproject/build-impl.xml

+ 4
- 2
build.xml Wyświetl plik

@@ -4,8 +4,10 @@
4 4
 <!-- (If you delete it and reopen the project it will be recreated.) -->
5 5
 <project name="DMDirc" default="default" basedir=".">
6 6
     <description>Builds, tests, and runs the project DMDirc.</description>
7
-		<import file="nbproject/build-impl.xml"/>
8
-		<import file="BuildPlugins.xml"/>
7
+
8
+    <import file="nbproject/build-impl.xml"/>
9
+    <import file="BuildPlugins.xml"/>
10
+
9 11
     <!--
10 12
 
11 13
     There exist several targets which are by default empty and which can be 

+ 20
- 18
junitreport.xml Wyświetl plik

@@ -5,33 +5,35 @@
5 5
 <project name="DMDirc" default="default" basedir=".">
6 6
     <taskdef resource="clovertasks"/>
7 7
     <description>Builds, tests, and runs the project DMDirc.</description>
8
+
9
+    <property name="clover.jar" location="/home/dmdirc/clover/clover/lib/clover.jar"/>
10
+    <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
11
+    <available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
12
+
13
+    <target name="with.clover" depends="clean" if="clover.installed">
14
+        <clover-setup>
15
+            <fileset dir="src/com/dmdirc/" includes="**/*.java"/>
16
+        </clover-setup>
17
+    </target>
18
+
19
+    <target name="clover.html" if="clover.installed">
20
+        <mkdir dir="reports/clover" />
21
+        <mkdir dir="reports/clover/history" />
22
+        <clover-html-report outdir="reports/clover" historydir="reports/clover/history" title="DMDirc"/>
23
+    </target>
24
+
8 25
     <import file="nbproject/build-impl.xml"/>
9 26
     <property file="nbproject/project.properties"/>
10 27
     <property name="test.reports" value="./junitreports" />
11
-<!--    <target name="with.clover">
12
-       <clover-setup initString="mycoverage.db" source="1.5"/>
13
-    </target>
14
-   <target name="test-html" depends="with.clover,compile-test,test">
15
-       <classpath>
16
-           <pathelement path="${ant.home}/lib/clover.jar"/>
17
-       </classpath>
18
-   </target>
19
-    <target name="clover.html" depends="with.clover">
20
-        <clover-report>
21
-            <current outfile="clover_html">
22
-                <format type="html"/>
23
-            </current>
24
-        </clover-report>
25
-    </target> -->
26
-   <target name="test-html" depends="compile-test,test"/>
28
+
29
+		
30
+   <target name="test-html" depends="compile-test,test,clover.html"/>
27 31
    <target name="-post-test-run">
28
-<!--   <target name="test-html" depends="compile-test,test"> -->
29 32
       <junitreport todir="${test.reports}">
30 33
         <fileset dir="${build.test.results.dir}">
31 34
           <include name="TEST-*.xml" />
32 35
         </fileset>
33 36
         <report todir="${test.reports}" />
34 37
       </junitreport>
35
-<!--      <fail if="tests.failed">Some tests failed; see details above.</fail> -->
36 38
     </target>
37 39
 </project>

+ 3
- 0
nbproject/build-impl.xml Wyświetl plik

@@ -194,6 +194,9 @@ is divided into following sections:
194 194
             <attribute default="**" name="testincludes"/>
195 195
             <sequential>
196 196
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
197
+                    <classpath>
198
+                        <pathelement path="${clover.jar}"/>
199
+                    </classpath>
197 200
                     <batchtest todir="${build.test.results.dir}">
198 201
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
199 202
                             <filename name="@{testincludes}"/>

Ładowanie…
Anuluj
Zapisz