瀏覽代碼

More build file jiggery pokery. Does not impact functionality.


git-svn-id: http://svn.dmdirc.com/trunk@4587 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Chris Smith 15 年之前
父節點
當前提交
0a8fbc460e
共有 5 個檔案被更改,包括 92 行新增25 行删除
  1. 25
    0
      build-installer.xml
  2. 0
    2
      build-plugins.xml
  3. 51
    0
      build-tests.xml
  4. 9
    20
      build.xml
  5. 7
    3
      junitreport.xml

+ 25
- 0
build-installer.xml 查看文件

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project name="DMDirc-installer" default="default" basedir=".">
3
+    <description>Tasks to build the DMDirc installer.</description>
4
+
5
+    <target name="-installer-build" if="has.bash">
6
+        <exec executable="/bin/bash" dir="installer" resultproperty="installer.result">
7
+            <arg value="release.sh"/>
8
+            <arg value="this"/>
9
+        </exec>
10
+
11
+        <condition property="installer.success">
12
+            <equals arg1="${installer.result}" arg2="0" />
13
+        </condition>
14
+
15
+        <echo message="Installer build finished."/>
16
+        <echo message="Completed build files can be found in:"/>
17
+        <echo message="    ${installer.output.dir}"/>
18
+        <echo message=""/>
19
+    </target>
20
+    
21
+    <target name="-installer-nobuild" unless="has.bash">
22
+        <echo message="This task only works on linux"/>
23
+    </target>
24
+
25
+</project>

+ 0
- 2
build-plugins.xml 查看文件

38
         
38
         
39
     <target name="build-plugins" depends="build-plugins_bash, build-plugins_ant-contrib"/>
39
     <target name="build-plugins" depends="build-plugins_bash, build-plugins_ant-contrib"/>
40
     
40
     
41
-    <available file="/bin/bash" property="has.bash"/>    
42
-
43
     <target name="build-plugins_bash" unless="has.ant-contrib" if="has.bash">
41
     <target name="build-plugins_bash" unless="has.ant-contrib" if="has.bash">
44
         <exec executable="/bin/bash">
42
         <exec executable="/bin/bash">
45
             <arg value="createAllPluginJar.sh"/>
43
             <arg value="createAllPluginJar.sh"/>

+ 51
- 0
build-tests.xml 查看文件

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project name="DMDirc-tests" default="default" basedir=".">
3
+    <description>Test-related tasks for DMDirc.</description>
4
+
5
+    <property name="clover.jar" location="/home/dmdirc/clover/clover/lib/clover.jar"/>
6
+    <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
7
+    <available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
8
+
9
+    <target name="with.clover" depends="clean" if="clover.installed">
10
+        <clover-clean/>
11
+        <clover-setup>
12
+            <fileset dir="src/com/" includes="**/*.java" />
13
+            <fileset dir="test/com/">
14
+                <include name="**/*.java" />
15
+                <exclude name="**/harness/**/*.java" />
16
+            </fileset>
17
+        </clover-setup>
18
+    </target>
19
+
20
+    <target name="clover.xml" if="clover.installed">
21
+        <mkdir dir="reports/clover" />
22
+        <clover-report>
23
+            <current outfile="reports/clover/clover.xml"/>
24
+        </clover-report>
25
+    </target>
26
+
27
+    <target name="clover.html" if="clover.installed">
28
+        <mkdir dir="reports/clover" />
29
+        <mkdir dir="reports/clover/history" />
30
+        <clover-historypoint historydir="reports/clover/history" />
31
+        <clover-report>
32
+            <current outfile="reports/clover">
33
+                <format type="html"/>
34
+             </current>
35
+             <historical outfile="reports/clover" historydir="reports/clover/history" />
36
+        </clover-report>
37
+    </target>
38
+
39
+    <property name="test.reports" value="./junitreports" />
40
+
41
+    <target name="-do-test-reports">
42
+        <mkdir dir="${test.reports}" />
43
+        <junitreport todir="${test.reports}">
44
+            <fileset dir="${build.test.results.dir}">
45
+                <include name="TEST-*.xml" />
46
+            </fileset>
47
+            <report todir="${test.reports}" />
48
+        </junitreport>
49
+    </target>
50
+
51
+</project>

+ 9
- 20
build.xml 查看文件

2
 <project name="DMDirc" default="default" basedir=".">
2
 <project name="DMDirc" default="default" basedir=".">
3
     <description>Builds, tests, and runs the project DMDirc.</description>
3
     <description>Builds, tests, and runs the project DMDirc.</description>
4
 
4
 
5
+    <available file="/bin/bash" property="has.bash"/>
6
+
5
     <import file="nbproject/build-impl.xml"/>
7
     <import file="nbproject/build-impl.xml"/>
8
+    <import file="build-installer.xml"/>
6
     <import file="build-plugins.xml"/>
9
     <import file="build-plugins.xml"/>
7
     <import file="build-svn.xml"/>
10
     <import file="build-svn.xml"/>
11
+    <import file="build-tests.xml"/>
8
 
12
 
9
     <target name="installer" depends="-installer-nobuild, -installer-build"/>
13
     <target name="installer" depends="-installer-nobuild, -installer-build"/>
10
     
14
     
11
-    <target name="-installer-build" if="has.bash">
12
-        <exec executable="/bin/bash" dir="installer" resultproperty="installer.result">
13
-            <arg value="release.sh"/>
14
-            <arg value="this"/>
15
-        </exec>
16
-
17
-        <condition property="installer.success">
18
-            <equals arg1="${installer.result}" arg2="0" />
19
-        </condition>
20
-
21
-        <echo message="Installer build finished."/>
22
-        <echo message="Completed build files can be found in:"/>
23
-        <echo message="    ${installer.output.dir}"/>
24
-        <echo message=""/>
25
-    </target>
26
-    
27
-    <target name="-installer-nobuild" unless="has.bash">
28
-        <echo message="This task only works on linux"/>
29
-    </target>
30
-
31
     <target name="-post-compile" depends="unsvn, build-plugins"/>
15
     <target name="-post-compile" depends="unsvn, build-plugins"/>
32
     <target name="-pre-compile" depends="addsvn"/>
16
     <target name="-pre-compile" depends="addsvn"/>
33
 
17
 
18
+    <target name="test-html" depends="with.clover,compile-test,test,clover.html"/>
19
+    <target name="test-xml" depends="with.clover,compile-test,test,clover.xml"/>
20
+    <target name="test-both" depends="test-html,test-xml"/>
21
+    <target name="-post-test-run" depends="-do-test-reports"/>
22
+
34
 </project>
23
 </project>

+ 7
- 3
junitreport.xml 查看文件

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!-- You may freely edit this file. See commented blocks below for -->
3
-<!-- some examples of how to customize the build. -->
4
-<!-- (If you delete it and reopen the project it will be recreated.) -->
5
 <project name="DMDirc" default="default" basedir=".">
2
 <project name="DMDirc" default="default" basedir=".">
3
+    <!--
4
+
5
+    THIS FILE IS DEPRECATED. THE TASKS HAVE BEEN INTEGRATED INTO THE MAIN
6
+    DMDIRC BUILD FILE. IT WILL BE REMOVED IN THE FUTURE. STOP USING IT.
7
+
8
+    -->
9
+
6
     <description>Builds, tests, and runs the project DMDirc.</description>
10
     <description>Builds, tests, and runs the project DMDirc.</description>
7
 
11
 
8
     <property name="clover.jar" location="/home/dmdirc/clover/clover/lib/clover.jar"/>
12
     <property name="clover.jar" location="/home/dmdirc/clover/clover/lib/clover.jar"/>

Loading…
取消
儲存