|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : conflict-checker.ant.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="quality.conflict-checker" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 Analyse the content created from two different components. |
|
26 </description> |
|
27 |
|
28 <property name="build.duplicates.log" location="${build.log.dir}/${build.id}_build_duplicates.xml" /> |
|
29 |
|
30 <!-- |
|
31 This macro extract the list of files generated/exported several time from different component |
|
32 during the build . It uses the output of "abld -what" commands to extract the information. |
|
33 The output is an XML file that can be transform to anything using XSLT of FMPP. |
|
34 e.g: |
|
35 <pre> |
|
36 <hlm:checkBuildDuplicatesMacro output="${build.duplicates.log}"> |
|
37 <fileset dir="${build.log.dir}"> |
|
38 <include name="${build.id}.*_compile.log"/> |
|
39 <include name="${build.id}.what.cmaker.log"/> |
|
40 <exclude name="${build.id}.*_output_build.log"/> |
|
41 </fileset> |
|
42 </hlm:checkBuildDuplicatesMacro> |
|
43 </pre> |
|
44 --> |
|
45 <scriptdef name="checkBuildDuplicatesMacro" language="jython" uri="http://www.nokia.com/helium"> |
|
46 <attribute name="output" /> |
|
47 <element name="fileset" type="fileset" /> |
|
48 <![CDATA[ |
|
49 import integration.ant |
|
50 integration.ant.check_build_duplicates_task(project, self, attributes, elements) |
|
51 ]]> |
|
52 </scriptdef> |
|
53 |
|
54 <!-- |
|
55 Check if the build duplicated needs to be run. |
|
56 --> |
|
57 <target name="check-build-duplicates"> |
|
58 <if> |
|
59 <or> |
|
60 <equals arg1="${build.system}" arg2="sbs" /> |
|
61 <equals arg1="${build.system}" arg2="sbs-ec" /> |
|
62 </or> |
|
63 <then> |
|
64 <property name="skip.build.duplicates" value="" /> |
|
65 </then> |
|
66 </if> |
|
67 </target> |
|
68 |
|
69 <!-- Parse all the build log and extract files that are generated/exported |
|
70 several times. |
|
71 --> |
|
72 <target name="integration-build-duplicates" depends="check-build-duplicates" unless="skip.build.duplicates"> |
|
73 <hlm:checkBuildDuplicatesMacro output="${build.duplicates.log}"> |
|
74 <fileset dir="${build.log.dir}"> |
|
75 <include name="${build.id}.*_compile.log" /> |
|
76 <include name="${build.id}.what.cmaker.log" /> |
|
77 <exclude name="${build.id}.*_output_build.log" /> |
|
78 </fileset> |
|
79 </hlm:checkBuildDuplicatesMacro> |
|
80 </target> |
|
81 |
|
82 <!-- Render the build duplicates xml file into an HTML output. --> |
|
83 <target name="render-build-duplicates" depends="integration-build-duplicates" unless="skip.build.duplicates"> |
|
84 <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/build-duplicates.html.ftl" outputFile="${build.log.dir}/${build.id}_build-duplicates.html"> |
|
85 <freemarkerLinks expandProperties="yes"> |
|
86 macro: ${helium.dir}/tools/common/templates/macro |
|
87 </freemarkerLinks> |
|
88 <data expandProperties="yes"> |
|
89 doc: xml(${build.duplicates.log}) |
|
90 ant: antProperties() |
|
91 </data> |
|
92 </fmpp> |
|
93 </target> |
|
94 |
|
95 </project> |