29 <!-- Default name of the build duplicates log file. |
29 <!-- Default name of the build duplicates log file. |
30 @type string |
30 @type string |
31 @scope private |
31 @scope private |
32 --> |
32 --> |
33 <property name="build.duplicates.log" location="${temp.build.dir}/${build.id}_build_duplicates.xml" /> |
33 <property name="build.duplicates.log" location="${temp.build.dir}/${build.id}_build_duplicates.xml" /> |
|
34 |
|
35 <!-- Check, is it required to run build duplicates --> |
|
36 <condition property="run.build.duplicates"> |
|
37 <not> |
|
38 <or> |
|
39 <equals arg1="${build.system}" arg2="sbs" /> |
|
40 <equals arg1="${build.system}" arg2="sbs-ec" /> |
|
41 </or> |
|
42 </not> |
|
43 </condition> |
34 |
44 |
35 <!-- |
45 <!-- |
36 This macro extract the list of files generated/exported several time from different component |
46 This macro extract the list of files generated/exported several time from different component |
37 during the build . It uses the output of "abld -what" commands to extract the information. |
47 during the build . It uses the output of "abld -what" commands to extract the information. |
38 The output is an XML file that can be transform to anything using XSLT of FMPP. |
48 The output is an XML file that can be transform to anything using XSLT of FMPP. |
53 <![CDATA[ |
63 <![CDATA[ |
54 import integration.ant |
64 import integration.ant |
55 integration.ant.check_build_duplicates_task(project, self, attributes, elements) |
65 integration.ant.check_build_duplicates_task(project, self, attributes, elements) |
56 ]]> |
66 ]]> |
57 </scriptdef> |
67 </scriptdef> |
58 |
68 |
59 <!-- |
|
60 Check if the build duplicated needs to be run. |
|
61 --> |
|
62 <target name="check-build-duplicates"> |
|
63 <condition property="skip.build.duplicates" value=""> |
|
64 <or> |
|
65 <equals arg1="${build.system}" arg2="sbs" /> |
|
66 <equals arg1="${build.system}" arg2="sbs-ec" /> |
|
67 </or> |
|
68 </condition> |
|
69 </target> |
|
70 |
|
71 <!-- Parse all the build log and extract files that are generated/exported |
69 <!-- Parse all the build log and extract files that are generated/exported |
72 several times. |
70 several times. |
73 --> |
71 --> |
74 <target name="integration-build-duplicates" depends="check-build-duplicates" unless="skip.build.duplicates"> |
72 <target name="integration-build-duplicates" if="run.build.duplicates"> |
75 <hlm:checkBuildDuplicatesMacro output="${build.duplicates.log}"> |
73 <hlm:checkBuildDuplicatesMacro output="${build.duplicates.log}"> |
76 <fileset dir="${compile.log.dir}"> |
74 <fileset dir="${compile.log.dir}"> |
77 <include name="${build.id}.*_compile.log" /> |
75 <include name="${build.id}.*_compile.log" /> |
78 <include name="${build.id}.what.cmaker.log" /> |
76 <include name="${build.id}.what.cmaker.log" /> |
79 <exclude name="${build.id}.*_output_build.log" /> |
77 <exclude name="${build.id}.*_output_build.log" /> |
80 </fileset> |
78 </fileset> |
81 </hlm:checkBuildDuplicatesMacro> |
79 </hlm:checkBuildDuplicatesMacro> |
82 </target> |
80 </target> |
83 |
81 |
84 <!-- Render the build duplicates xml file into an HTML output. --> |
82 <!-- Render the build duplicates xml file into an HTML output. --> |
85 <target name="render-build-duplicates" depends="integration-build-duplicates" unless="skip.build.duplicates"> |
83 <target name="render-build-duplicates" depends="integration-build-duplicates" if="run.build.duplicates"> |
86 <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/build-duplicates.html.ftl" outputFile="${build.log.dir}/${build.id}_build-duplicates.html"> |
84 <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/build-duplicates.html.ftl" outputFile="${build.log.dir}/${build.id}_build-duplicates.html"> |
87 <freemarkerLinks expandProperties="yes"> |
85 <freemarkerLinks expandProperties="yes"> |
88 macro: ${helium.dir}/tools/common/templates/macro |
86 macro: ${helium.dir}/tools/common/templates/macro |
89 </freemarkerLinks> |
87 </freemarkerLinks> |
90 <data expandProperties="yes"> |
88 <data expandProperties="yes"> |