Bläddra i källkod

Add clover


git-svn-id: http://svn.dmdirc.com/trunk@3243 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Shane Mc Cormack 16 år sedan
förälder
incheckning
ce04c5d751
3 ändrade filer med 27 tillägg och 20 borttagningar
  1. 4
    2
      build.xml
  2. 20
    18
      junitreport.xml
  3. 3
    0
      nbproject/build-impl.xml

+ 4
- 2
build.xml Visa fil

4
 <!-- (If you delete it and reopen the project it will be recreated.) -->
4
 <!-- (If you delete it and reopen the project it will be recreated.) -->
5
 <project name="DMDirc" default="default" basedir=".">
5
 <project name="DMDirc" default="default" basedir=".">
6
     <description>Builds, tests, and runs the project DMDirc.</description>
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
     There exist several targets which are by default empty and which can be 
13
     There exist several targets which are by default empty and which can be 

+ 20
- 18
junitreport.xml Visa fil

5
 <project name="DMDirc" default="default" basedir=".">
5
 <project name="DMDirc" default="default" basedir=".">
6
     <taskdef resource="clovertasks"/>
6
     <taskdef resource="clovertasks"/>
7
     <description>Builds, tests, and runs the project DMDirc.</description>
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
     <import file="nbproject/build-impl.xml"/>
25
     <import file="nbproject/build-impl.xml"/>
9
     <property file="nbproject/project.properties"/>
26
     <property file="nbproject/project.properties"/>
10
     <property name="test.reports" value="./junitreports" />
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
    <target name="-post-test-run">
31
    <target name="-post-test-run">
28
-<!--   <target name="test-html" depends="compile-test,test"> -->
29
       <junitreport todir="${test.reports}">
32
       <junitreport todir="${test.reports}">
30
         <fileset dir="${build.test.results.dir}">
33
         <fileset dir="${build.test.results.dir}">
31
           <include name="TEST-*.xml" />
34
           <include name="TEST-*.xml" />
32
         </fileset>
35
         </fileset>
33
         <report todir="${test.reports}" />
36
         <report todir="${test.reports}" />
34
       </junitreport>
37
       </junitreport>
35
-<!--      <fail if="tests.failed">Some tests failed; see details above.</fail> -->
36
     </target>
38
     </target>
37
 </project>
39
 </project>

+ 3
- 0
nbproject/build-impl.xml Visa fil

194
             <attribute default="**" name="testincludes"/>
194
             <attribute default="**" name="testincludes"/>
195
             <sequential>
195
             <sequential>
196
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
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
                     <batchtest todir="${build.test.results.dir}">
200
                     <batchtest todir="${build.test.results.dir}">
198
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
201
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
199
                             <filename name="@{testincludes}"/>
202
                             <filename name="@{testincludes}"/>

Laddar…
Avbryt
Spara