author | jascui |
Wed, 17 Nov 2010 13:47:08 +0800 | |
changeset 690 | c67de7b29582 |
parent 645 | b8d81fa19e7d |
permissions | -rw-r--r-- |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
2 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
3 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
4 |
Name : ido-prep.ant.xml |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
5 |
Part of : Helium |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
6 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
8 |
All rights reserved. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
9 |
This component and the accompanying materials are made available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
10 |
under the terms of the License "Eclipse Public License v1.0" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
11 |
which accompanies this distribution, and is available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html". |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
13 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
14 |
Initial Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
15 |
Nokia Corporation - initial contribution. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
16 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
17 |
Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
18 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
19 |
Description: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
20 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
21 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
22 |
--> |
217 | 23 |
<!--* @package preparation --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
24 |
<project name="ido-prep" xmlns:hlm="http://www.nokia.com/helium"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
25 |
<description> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
26 |
IDO related targets. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
27 |
* Build area preparation |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
28 |
* Codescanner integration |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
29 |
* Cenrep generation (old way) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
30 |
* IBY export (old way) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
31 |
</description> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
32 |
|
645 | 33 |
<!-- Path to the cenrep root. Default value is "${build.drive}/epoc32/tools/cenrep/ido/src" |
217 | 34 |
@type string |
35 |
@scope private |
|
36 |
--> |
|
645 | 37 |
<property name="ido.cenrep.root" location="${build.drive}/epoc32/tools/cenrep/ido/src" /> |
38 |
<!-- Path to the cenrep target directory. Default value is "${build.drive}/epoc32/data/z/private/10202be9" |
|
217 | 39 |
@type string |
40 |
@scope private |
|
41 |
--> |
|
645 | 42 |
<property name="ido.cenrep.target" value="${build.drive}/epoc32/data/z/private/10202be9" /> |
217 | 43 |
<!-- Defines the location of Codescanner output. |
44 |
@type string |
|
45 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
46 |
<property name="ido.codescanner.output.dir" location="${build.output.dir}/${build.id}_codescanner"/> |
588 | 47 |
|
48 |
<!-- Defines the location of CMT++ output and the input for the diamonds creation target. |
|
49 |
@type string |
|
50 |
--> |
|
51 |
<property name="ido.cmt.html.output.dir" location="${build.log.dir}/${build.id}_cmt"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
52 |
|
628 | 53 |
<!--* @property package.cone.validation.enabled |
54 |
Enables to run confml file validation. |
|
55 |
@type boolean |
|
56 |
@editable required |
|
57 |
@scope public |
|
58 |
@since 11.0 |
|
59 |
--> |
|
60 |
||
61 |
<!--* @property internal.package.cone.validation.enabled |
|
62 |
Enables the targets to run confml file validation if package.cone.validation.enabled set to true. |
|
63 |
@type boolean |
|
64 |
@scope private |
|
65 |
--> |
|
645 | 66 |
|
67 |
<!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA for quality targets. |
|
68 |
@type string |
|
69 |
@scope private |
|
70 |
@deprecated since 12.0 Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro. |
|
71 |
--> |
|
72 |
<property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/> |
|
73 |
||
74 |
<!-- Path to a INI file that contains the quality mapping between the ADO from Synergy WA and it's location on the BA for quality targets. |
|
75 |
@type string |
|
76 |
@scope private |
|
77 |
@deprecated since 12.0 Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro. |
|
78 |
--> |
|
79 |
<property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/> |
|
80 |
||
81 |
<!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include" |
|
82 |
deprecated: Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro. |
|
83 |
@type string |
|
84 |
@scope private |
|
85 |
@deprecated 12.0 since Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro. |
|
86 |
--> |
|
628 | 87 |
|
88 |
<!--* @property cmt.enabled |
|
89 |
Enables to run cmt, testing code coverage tool. |
|
90 |
@type boolean |
|
91 |
@editable required |
|
92 |
@scope public |
|
93 |
@since 11.0 |
|
94 |
--> |
|
95 |
||
96 |
<!--* @property internal.cmt.enabled |
|
97 |
Enables to run cmt tools targets if cmt.enabled is set to true, testing code coverage tool. |
|
98 |
@type boolean |
|
99 |
@scope private |
|
100 |
--> |
|
101 |
||
102 |
<!--* @property enable.cmt |
|
103 |
Enables to run cmt, testing code coverage tool. - deprecated: Start using cmt.enabled property. |
|
104 |
@type boolean |
|
105 |
@editable required |
|
106 |
@scope public |
|
107 |
@deprecated since 11.0 |
|
108 |
--> |
|
109 |
||
110 |
<!--* Enables codescanner tool to run. |
|
111 |
@type boolean |
|
112 |
@editable required |
|
113 |
@scope public |
|
114 |
@since 11.0 |
|
115 |
--> |
|
645 | 116 |
<property name="codescanner.enabled" value="true"/> |
628 | 117 |
|
645 | 118 |
<!--* @property codescanner.lxr.source.url |
119 |
Enables source files referring to lxr url path in codescanner output html files. Should not include source path on platform. |
|
120 |
@type string |
|
121 |
@scope public |
|
122 |
@since 12.0 |
|
123 |
--> |
|
628 | 124 |
|
125 |
<!--* @property internal.codescanner.enabled |
|
126 |
Enables codescanner targets to run if codescanner.enabled is set to true. |
|
127 |
@type boolean |
|
128 |
@scope private |
|
129 |
--> |
|
130 |
||
131 |
<!--* @property skip.codescanner |
|
132 |
Enables codescanner tool to run. - deprecated: Start using codescanner.enabled property. |
|
133 |
@type boolean |
|
134 |
@editable required |
|
135 |
@scope public |
|
136 |
@deprecated since 11.0 |
|
137 |
--> |
|
138 |
||
139 |
<!-- Set to true to keep old sources of build area. |
|
140 |
@type boolean |
|
141 |
@editable required |
|
142 |
@scope public |
|
143 |
@since 11.0 |
|
144 |
--> |
|
145 |
<property name="keep.old.source.enabled" value="false"/> |
|
146 |
||
147 |
<!--* @property ido.keep.old |
|
148 |
Set to true to keep old sources of build area. - deprecated: Start using keep.old.source.enabled property. |
|
149 |
@type boolean |
|
150 |
@editable required |
|
151 |
@scope public |
|
152 |
@deprecated since 11.0 |
|
153 |
--> |
|
154 |
||
155 |
<!-- Set to true to copy internal folders while coping source from wa to build area. |
|
156 |
@type boolean |
|
157 |
@editable required |
|
158 |
@scope public |
|
159 |
@since 11.0 |
|
160 |
--> |
|
161 |
<property name="keep.internal.folders.enabled" value="false"/> |
|
162 |
||
163 |
<!--* @property keep.internals |
|
164 |
Set to true to keep old internal folder while coping source from wa to build area. - deprecated: Start using keep.internal.folders.enabled property. |
|
165 |
@type boolean |
|
166 |
@editable required |
|
167 |
@scope public |
|
168 |
@deprecated since 11.0 |
|
169 |
--> |
|
170 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
171 |
<!-- Internal target that generates the '''ado.mapping.file'''. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
172 |
It is a INI file that contains ADO location as a key and target location as value. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
173 |
--> |
628 | 174 |
|
175 |
<!-- To enable to confml file validation --> |
|
176 |
<condition property="internal.package.cone.validation.enabled"> |
|
177 |
<istrue value="${package.cone.validation.enabled}" /> |
|
178 |
</condition> |
|
179 |
||
180 |
<!-- check, is cmt enabled --> |
|
181 |
<condition property="internal.cmt.enabled"> |
|
182 |
<or> |
|
183 |
<istrue value="${cmt.enabled}" /> |
|
184 |
<isset property="enable.cmt"/> |
|
185 |
</or> |
|
186 |
</condition> |
|
187 |
||
188 |
<!-- check is codescanner enabled--> |
|
189 |
<condition property="internal.codescanner.enabled"> |
|
190 |
<and> |
|
191 |
<not> |
|
192 |
<isfalse value="${codescanner.enabled}" /> |
|
193 |
</not> |
|
194 |
<not> |
|
195 |
<isset property="skip.codescanner"/> |
|
196 |
</not> |
|
197 |
</and> |
|
198 |
</condition> |
|
645 | 199 |
|
200 |
<!-- |
|
201 |
@deprecated: since 12.0: Use createAdoMappingMacro |
|
202 |
--> |
|
587 | 203 |
<target name="ido-create-ado-mapping"> |
645 | 204 |
<hlm:createAdoMappingMacro adoMapFile="${ado.mapping.file}" /> |
205 |
<hlm:createAdoMappingMacro adoMapFile="${ado.quality.mapping.file}" mapForQuality="true"/> |
|
206 |
</target> |
|
207 |
||
208 |
<!-- Internal target to generate ado mapping for old sysdef format, this would be deprecated once |
|
209 |
the sysdef3 is deployed. |
|
210 |
--> |
|
211 |
<scriptdef name="adoMappingOldSysdefMacro" language="jython" uri="http://www.nokia.com/helium"> |
|
212 |
<attribute name="adomapfile" /> |
|
213 |
<attribute name="mapforquality" /> |
|
214 |
import os |
|
179 | 215 |
import idoprep |
645 | 216 |
idoprep.create_ado_mapping(project.getProperty(r"prep.dynamic.sysdef.config"), attributes.get(r"adomapfile"), attributes.get(r"mapforquality"), project.getProperty(r"build.drive"), project.getProperty(r"ado.quality.dirs.path")) |
217 |
</scriptdef> |
|
218 |
||
219 |
<!-- Generates ado mapping file which could be used to identify the new sources. |
|
220 |
e.g: |
|
221 |
<pre> |
|
222 |
<property name="prep.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_copy.ini" /> |
|
223 |
<hlm:createAdoMappingMacro adoMapFile="${prep.copy.mapping.file}" /> |
|
224 |
</pre> |
|
225 |
||
226 |
Usage example: |
|
227 |
<pre> |
|
228 |
<target name="ido-map-file"> |
|
229 |
<property name="prep.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_copy.ini" /> |
|
230 |
<hlm:createAdoMappingMacro adoMapFile="${prep.copy.mapping.file}" /> |
|
231 |
</target> |
|
232 |
</pre> |
|
233 |
--> |
|
234 |
<macrodef name="createAdoMappingMacro" uri="http://www.nokia.com/helium"> |
|
235 |
<attribute name="adoMapFile"/> |
|
236 |
<attribute name="mapForQuality" default="false"/> |
|
237 |
<sequential> |
|
238 |
<mkdir dir="${build.output.dir}/build"/> |
|
239 |
<mkdir dir="${temp.build.dir}"/> |
|
240 |
<if> |
|
241 |
<istrue value="${sysdef3.enabled}" /> |
|
242 |
<then> |
|
243 |
<if> |
|
244 |
<and> |
|
245 |
<isreference refid="ado.quality.dirs" /> |
|
246 |
<equals arg1="@{mapForQuality}" arg2="true" /> |
|
247 |
</and> |
|
248 |
<then> |
|
249 |
<hlm:createPackageMapping epocroot="${build.drive}" destFile="@{adoMapFile}" |
|
250 |
filterDirSet="ado.quality.dirs" > |
|
251 |
<path refid="system.definition.files" /> |
|
252 |
</hlm:createPackageMapping> |
|
253 |
</then> |
|
254 |
<else> |
|
255 |
<hlm:createPackageMapping epocroot="${build.drive}" destFile="@{adoMapFile}"> |
|
256 |
<path refid="system.definition.files" /> |
|
257 |
</hlm:createPackageMapping> |
|
258 |
</else> |
|
259 |
</if> |
|
260 |
</then> |
|
261 |
<else> |
|
262 |
<tempfile property="prep.dynamic.sysdef.config" suffix=".txt" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
263 |
<trycatch property="error.message"> |
|
264 |
<try> |
|
265 |
<hlm:referenceToFileMacro refid="system.definition.files" output="${prep.dynamic.sysdef.config}"/> |
|
266 |
</try> |
|
267 |
<catch> |
|
268 |
<propertyregex property="message" input="${error.message}" |
|
269 |
regexp=":(.*)$" |
|
270 |
select="\1" casesensitive="false" /> |
|
271 |
<fail message="Error: ${message}" /> |
|
272 |
</catch> |
|
273 |
</trycatch> |
|
274 |
<trycatch> |
|
275 |
<try> |
|
276 |
<pathconvert pathsep="," property="ado.quality.dirs.path"> |
|
277 |
<dirset refid="ado.quality.dirs"/> |
|
278 |
</pathconvert> |
|
279 |
</try> |
|
280 |
</trycatch> |
|
281 |
<hlm:adoMappingOldSysdefMacro adomapfile="@{adoMapFile}" mapforquality="@{mapForQuality}" /> |
|
282 |
</else> |
|
283 |
</if> |
|
284 |
</sequential> |
|
285 |
</macrodef> |
|
286 |
||
179 | 287 |
<!-- Target to generate cenreps using cone tool --> |
288 |
<target name="ido-gen-cenrep"> |
|
217 | 289 |
<mkdir dir="${post.log.dir}" /> |
628 | 290 |
<mkdir dir="${temp.build.dir}" /> |
291 |
<tempfile property="cenrep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
645 | 292 |
<fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-cenrep-gen.xml.ftl" |
628 | 293 |
outputfile="${cenrep.dynamic.config}"> |
294 |
<data expandProperties="yes"> |
|
295 |
dbPath: ${metadata.dbfile} |
|
296 |
ant: antProperties() |
|
297 |
os: eval('System.getProperty("os.name")') |
|
298 |
</data> |
|
299 |
</fmpp> |
|
300 |
<ant antfile="${cenrep.dynamic.config}"/> |
|
217 | 301 |
<copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false"> |
179 | 302 |
<filterchain> |
303 |
<linecontainsregexp> |
|
304 |
<regexp pattern="^\s*Generating file"/> |
|
305 |
</linecontainsregexp> |
|
306 |
</filterchain> |
|
307 |
</copy> |
|
308 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
|
309 |
<hlm:textmetadatainput> |
|
310 |
<fileset casesensitive="false" file="${post.log.dir}/${build.id}_cenrep.cone.log" /> |
|
311 |
<metadatafilterset> |
|
312 |
<metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" /> |
|
313 |
<metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" /> |
|
314 |
<metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" /> |
|
315 |
</metadatafilterset> |
|
316 |
</hlm:textmetadatainput> |
|
317 |
</hlm:metadatarecord> |
|
628 | 318 |
<hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_cenrep.cone.log" database="${metadata.dbfile}" property="cone.error.total"/> |
179 | 319 |
<echo>ConE error: ${cone.error.total}</echo> |
628 | 320 |
<hlm:generateBuildStatus file="${post.log.dir}/${build.id}_cenrep.cone.log" /> |
179 | 321 |
</target> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
322 |
|
628 | 323 |
<!-- To validate confml files of packages.--> |
324 |
<target name="ido-validate-confml" if="internal.package.cone.validation.enabled"> |
|
325 |
<mkdir dir="${post.log.dir}" /> |
|
326 |
<mkdir dir="${temp.build.dir}" /> |
|
327 |
<tempfile property="confml.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
645 | 328 |
<fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-confml-validate.ant.xml.ftl" |
628 | 329 |
outputfile="${confml.dynamic.config}"> |
330 |
<data expandProperties="yes"> |
|
331 |
dbPath: ${metadata.dbfile} |
|
332 |
ant: antProperties() |
|
333 |
os: eval('System.getProperty("os.name")') |
|
334 |
</data> |
|
335 |
</fmpp> |
|
336 |
<trycatch property="confml.validate.thrown"> |
|
337 |
<try> |
|
338 |
<ant antfile="${confml.dynamic.config}"/> |
|
339 |
</try> |
|
340 |
<catch> |
|
341 |
<fail message="${confml.validate.thrown}"/> |
|
342 |
</catch> |
|
343 |
<finally> |
|
344 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
|
345 |
<hlm:textmetadatainput> |
|
346 |
<fileset dir="" casesensitive="false" file="${post.log.dir}/${build.id}_validate_confml.log" /> |
|
347 |
<metadatafilterset> |
|
348 |
<metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" /> |
|
349 |
<metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" /> |
|
350 |
<metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" /> |
|
351 |
<metadatafilter priority="error" regex="\s*[1-9]\d*\s*problem\(s\).*?" description="cone validation error" /> |
|
352 |
</metadatafilterset> |
|
353 |
</hlm:textmetadatainput> |
|
354 |
</hlm:metadatarecord> |
|
355 |
<hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_validate_confml.log" database="${metadata.dbfile}" property="confml.validate.error.total"/> |
|
356 |
<echo>ConE error: ${confml.validate.error.total}</echo> |
|
357 |
<hlm:generateBuildStatus file="${build.id}_validate_confml.log" /> |
|
358 |
<hlm:signalMacro logfile="${post.log.dir}/${build.id}_validate_confml.log" phase="post" signal.input="ConEValidateSignalInput" /> |
|
359 |
</finally> |
|
360 |
</trycatch> |
|
361 |
||
362 |
</target> |
|
587 | 363 |
|
628 | 364 |
|
365 |
<!--* Defines which template to use in order to achive the package copying. |
|
366 |
@type string |
|
587 | 367 |
@scope public |
368 |
--> |
|
645 | 369 |
<property name="ido.prep.copy.template" location="${helium.dir}/tools/preparation/templates/ido-ant-copy.xml.ftl" /> |
587 | 370 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
371 |
<!-- Target that uses the information from the system.definition.files to prepare the IDO build area. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
372 |
It relies on the fact that layer_real_source_path entity is declared in each ADO configuration. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
373 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
374 |
By default it deletes the previous content. If you want to backup what was previoulsy used please |
628 | 375 |
defined '''keep.old.source.enabled''' property. |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
376 |
--> |
645 | 377 |
<target name="ido-prep-copy"> |
378 |
<property name="prep.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_copy.ini" /> |
|
379 |
<hlm:createAdoMappingMacro adoMapFile="${prep.copy.mapping.file}" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
380 |
<mkdir dir="${temp.build.dir}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
381 |
<tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
587 | 382 |
<fmpp sourceFile="${ido.prep.copy.template}" |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
383 |
outputFile="${prep.dynamic.config}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
384 |
<data expandProperties="yes"> |
645 | 385 |
inputfile: antProperty(prep.copy.mapping.file) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
386 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
387 |
data: eval(' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
388 |
java.io.FileInputStream pin = new java.io.FileInputStream(filename); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
389 |
java.util.Properties props = new java.util.Properties(); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
390 |
props.load(pin); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
391 |
return props; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
392 |
', {filename:get(inputfile)}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
393 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
394 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
395 |
<ant antfile="${prep.dynamic.config}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
396 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
397 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
398 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
399 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
400 |
Run cleanup system definition configuration. The configuration name are |
645 | 401 |
generated from the ``sysdef.configurations.list`` property, appending '_clean' |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
402 |
at the end of each configuration also reversing their build order. |
645 | 403 |
if ``sysdef.clean.configurations.list`` is defined it overrides |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
404 |
the previous beharvious and is used to cleanup the environment. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
405 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
406 |
<target name ="ido-prep-clean"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
407 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
408 |
<not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
409 |
<isset property="sysdef.clean.configurations.list"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
410 |
</not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
411 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
412 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
413 |
<isset property="sysdef.configurations.list"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
414 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
415 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
416 |
rev_names = "" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
417 |
for sysdef in project.getProperty("sysdef.configurations.list").split(","): |
645 | 418 |
rev_names = sysdef + "_clean," + rev_names |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
419 |
project.setProperty("sysdef.clean.configurations.list", rev_names) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
420 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
421 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
422 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
423 |
<fail message="You should either define sysdef.clean.configurations.list or sysdef.configurations.list."/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
424 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
425 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
426 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
427 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
428 |
|
628 | 429 |
<antcall target="compile-main" inheritRefs="true"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
430 |
<param name="sysdef.configurations.list" value="${sysdef.clean.configurations.list}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
431 |
<param name="compile.signal.input" value="compileCleanSignalInput"/> |
628 | 432 |
<param name="internal.compile.discard.result.enabled" value="true"/> |
433 |
<param name="internal.compile.cmd.clean.enabled" value="true"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
434 |
</antcall> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
435 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
436 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
437 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
438 |
This targets run the codescanner application on each discovered ADO. |
645 | 439 |
The location of the output is defined byt ``ido.codescanner.output.dir`` property. |
440 |
And the type is defined by ``ido.codescanner.output.type`` (default is HTML). |
|
441 |
To update the HTML files with lxr source URL you need to set the property ``codescanner.lxr.source.url`` |
|
442 |
URL should not include source path on platform. |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
443 |
--> |
645 | 444 |
<target name="ido-codescanner" if="internal.codescanner.enabled"> |
445 |
<property name="codescanner.mapping.file" location="${build.output.dir}/build/ado_mapping_codescanner.ini" /> |
|
446 |
<hlm:createAdoMappingMacro adoMapFile="${codescanner.mapping.file}" mapForQuality="true"/> |
|
447 |
<!--hlm:iniKeys2Path ini="${codescanner.mapping.file}" pathid="ado.src.path"/--> |
|
217 | 448 |
<!-- Defines the format of Codescanner output (html|xml|std). |
449 |
@type string |
|
450 |
--> |
|
645 | 451 |
<hlm:resourceaccess lockName="subst-drive"> |
452 |
<property name="ido.codescanner.output.type" value="html"/> |
|
453 |
||
454 |
<!-- Defines the fmpp template for Codescanner. |
|
455 |
@type string |
|
456 |
@scope private |
|
457 |
--> |
|
458 |
<property name="ido.codescanner.template" value="${helium.dir}/tools/preparation/templates/ido-codescanner.ant.xml.ftl"/> |
|
459 |
<script language="jython" setbeans="false"> |
|
460 |
#internal.codescanner.drive |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
461 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
462 |
import fileutils |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
463 |
import configuration |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
464 |
import pathaddition.relative |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
465 |
|
645 | 466 |
config = configuration.PropertiesConfiguration(stream=open(str(project.getProperty("codescanner.mapping.file")), 'r')) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
467 |
prefix = pathaddition.relative.commonprefix(config.keys()) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
468 |
if not os.path.exists(prefix): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
469 |
raise Exception("Could not find common prefix for the following paths:\n" + "\n".join(config.keys())) |
587 | 470 |
if os.sep == '\\': |
471 |
self.log(str('Substing %s' % prefix)) |
|
472 |
drive = fileutils.get_next_free_drive() |
|
473 |
fileutils.subst(drive, prefix) |
|
474 |
else: |
|
475 |
drive = prefix |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
476 |
project.setProperty('internal.codescanner.drive', drive) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
477 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
478 |
# creating the structure form subst drive. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
479 |
path = project.createDataType("path") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
480 |
for location in config.keys(): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
481 |
self.log(str("From %s" % location)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
482 |
location = drive + os.sep + pathaddition.relative.abs2rel(location, prefix) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
483 |
self.log(str("To %s" % location)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
484 |
pe = path.createPathElement() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
485 |
pe.setPath(location) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
486 |
project.addReference('substed.ado.src.path', path) |
645 | 487 |
</script> |
488 |
</hlm:resourceaccess> |
|
587 | 489 |
<trycatch property="codescanner.thrown"> |
490 |
<try> |
|
645 | 491 |
<if> |
492 |
<isset property="codescanner.lxr.source.url"/> |
|
493 |
<then> |
|
494 |
<tempfile property="codescanner.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
495 |
<fmpp sourceFile="${ido.codescanner.template}" |
|
496 |
outputFile="${codescanner.dynamic.config}"> |
|
497 |
<data expandProperties="yes"> |
|
498 |
inputfile: antProperty(codescanner.mapping.file) |
|
499 |
ant: antProperties() |
|
500 |
data: eval(' |
|
501 |
java.io.FileInputStream pin = new java.io.FileInputStream(filename); |
|
502 |
java.util.Properties props = new java.util.Properties(); |
|
503 |
props.load(pin); |
|
504 |
return props; |
|
505 |
', {filename:get(inputfile)}) |
|
506 |
</data> |
|
507 |
</fmpp> |
|
508 |
<ant antfile="${codescanner.dynamic.config}"/> |
|
509 |
</then> |
|
510 |
<else> |
|
511 |
<hlm:codescanner dest="${ido.codescanner.output.dir}" |
|
512 |
format="${ido.codescanner.output.type}" |
|
513 |
configuration="${ido.codescanner.config}"> |
|
514 |
<path refid="substed.ado.src.path"/> |
|
515 |
</hlm:codescanner> |
|
516 |
</else> |
|
517 |
</if> |
|
587 | 518 |
</try> |
519 |
<catch> |
|
520 |
<fail message="${codescanner.thrown}" /> |
|
521 |
</catch> |
|
522 |
<finally> |
|
523 |
<hlm:unsubst drive="${internal.codescanner.drive}"/> |
|
524 |
</finally> |
|
525 |
</trycatch> |
|
645 | 526 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
527 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
528 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
529 |
<!-- CMT Tool target. Complexity tool measures. Supported options for cmt tool macro is |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
530 |
1. input - files to be measured |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
531 |
2. output - output xml file (file size is huge 68MB for JAVA IDO, if this needs to be send, need to consider |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
532 |
3. config - input config . |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
533 |
--> |
645 | 534 |
<target name="ido-cmt" if="internal.cmt.enabled"> |
535 |
<property name="cmt.mapping.file" location="${build.output.dir}/build/ado_mapping_cmt.ini" /> |
|
536 |
<hlm:createAdoMappingMacro adoMapFile="${cmt.mapping.file}" mapForQuality="true"/> |
|
537 |
<fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-cmt-ant.xml.ftl" |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
538 |
outputFile="${temp.build.dir}/ido-cmt.ant.xml"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
539 |
<data expandProperties="yes"> |
645 | 540 |
inputfile: antProperty(cmt.mapping.file) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
541 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
542 |
data: eval(' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
543 |
java.io.FileInputStream pin = new java.io.FileInputStream(filename); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
544 |
java.util.Properties props = new java.util.Properties(); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
545 |
props.load(pin); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
546 |
return props; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
547 |
', {filename:get(inputfile)}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
548 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
549 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
550 |
<ant antfile="${temp.build.dir}/ido-cmt.ant.xml"/> |
588 | 551 |
<runtarget target="cmt-generate-diamond-summary" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
552 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
553 |
|
588 | 554 |
<!-- CMT Tool target. Once the CMT tool has been run this scans the results file and puts the |
555 |
results into a .XML file in the diamonds folder ready for transmission to diamonds. |
|
556 |
The target uses the ido-cmt-summary-ant.xml.ftl file to create a file called ido-cmt-summary.ant.xml |
|
557 |
which contains 1 new target for each of the input folders found under the build area. Then the |
|
558 |
ido-cmt-summary.ant.xml file is called as an ant file and the targets executed. Each target runs |
|
559 |
the file scanner looking for CMT summary information which it extracts and writes to an |
|
560 |
XML file in the diamonds folder. |
|
561 |
--> |
|
628 | 562 |
<target name="cmt-generate-diamond-summary" if="internal.cmt.enabled"> |
563 |
||
588 | 564 |
<!--use the header.ftl template file to create the init part of the output file |
565 |
that can be copied to the final output file by the java class--> |
|
566 |
<property name="temp.diamonds.header.xml" location="${env.TEMP}/diamonds_header.xml" /> |
|
567 |
<fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" |
|
568 |
outputfile="${temp.diamonds.header.xml}" quiet="true"/> |
|
569 |
<property name="temp.diamonds.footer.xml" location="${env.TEMP}/diamonds_footer.xml" /> |
|
570 |
<fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_footer.ftl" |
|
571 |
outputfile="${temp.diamonds.footer.xml}" quiet="true"/> |
|
572 |
||
573 |
<hlm:cmtsummarytask diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}" |
|
574 |
outputFile="${diamonds.build.output.dir}/cmt_summary.xml" |
|
575 |
inputFile="${ido.cmt.html.output.dir}/CMTHTML/index.html" /> |
|
576 |
<delete file="${temp.diamonds.header.xml}" failonerror="false" /> |
|
577 |
<delete file="${temp.diamonds.footer.xml}" failonerror="false" /> |
|
578 |
||
579 |
</target> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
580 |
|
645 | 581 |
<!-- Target to copy files based on ado mapping. |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
582 |
--> |
645 | 583 |
<target name="ido-create-copy-file"> |
584 |
<property name="create.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_create_copy.ini" /> |
|
585 |
<hlm:createAdoMappingMacro adoMapFile="${create.copy.mapping.file}" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
586 |
<tempfile property="copyfile.dynamic.config" suffix=".ant.xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
645 | 587 |
<fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-export.ant.xml.ftl" |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
588 |
outputFile="${copyfile.dynamic.config}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
589 |
<data expandProperties="yes"> |
645 | 590 |
inputfile: antProperty(create.copy.mapping.file) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
591 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
592 |
data: eval(' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
593 |
java.io.FileInputStream pin = new java.io.FileInputStream(filename); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
594 |
java.util.Properties props = new java.util.Properties(); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
595 |
props.load(pin); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
596 |
return props; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
597 |
', {filename:get(inputfile)}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
598 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
599 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
600 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
601 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
602 |
<!-- Do the export of the ibys from ADO work area level to epoc32 tree. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
603 |
<target name="ido-copy-iby" depends="ido-create-copy-file"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
604 |
<ant antfile="${copyfile.dynamic.config}" target="ido-copy-iby"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
605 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
606 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
607 |
<!-- Do the export of the Excel keys*.xls from ADO work area level to |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
608 |
epoc32 tree. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
609 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
610 |
<target name="ido-copy-cenrep" depends="ido-create-copy-file"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
611 |
<delete dir="${ido.cenrep.root}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
612 |
<mkdir dir="${ido.cenrep.root}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
613 |
<ant antfile="${copyfile.dynamic.config}" target="ido-copy-cenrep"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
614 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
615 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
616 |
<!-- Generated cenrep from exported keys*.xls files. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
617 |
<target name="ido-create-cenrep" depends="ido-copy-cenrep"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
618 |
<delete dir="${ido.cenrep.root}/../data"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
619 |
<mkdir dir="${ido.cenrep.root}/../data"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
620 |
<exec executable="perl" dir="${ido.cenrep.root}" failonerror="true"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
621 |
<arg value="${build.drive}/epoc32/tools/cenrep/generate_cenrep_inifile.pl"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
622 |
<arg value="-r"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
623 |
<arg value="${ido.cenrep.platform}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
624 |
<arg value="-d"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
625 |
<arg value="${ido.cenrep.root}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
626 |
<arg value="-rd"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
627 |
<arg value="${ido.cenrep.root}/../data"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
628 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
629 |
<!-- Copy generated files to target path --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
630 |
<copy todir="${ido.cenrep.target}" verbose="true" flatten="true" overwrite="true"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
631 |
<fileset dir="${ido.cenrep.root}/../data"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
632 |
<include name="*.txt"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
633 |
</fileset> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
634 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
635 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
636 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
637 |
|
628 | 638 |
<!-- Gets the contents from a network drive or Dragonfly --> |
645 | 639 |
<target name="ido-check-latest-release" depends="ido-check-latest-release-network" unless="env.HLM_SUBCON"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
640 |
<runtarget target="ido-check-latest-release-dragonfly"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
641 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
642 |
|
645 | 643 |
<!--* @property s60.grace.service |
644 |
File service to look into. |
|
645 |
@type string |
|
646 |
@editable required |
|
647 |
@scope public |
|
648 |
@deprecated since 12.0 |
|
649 |
--> |
|
650 |
<!--* @property download.release.service |
|
651 |
File service to look into. |
|
652 |
@type string |
|
653 |
@editable required |
|
654 |
@scope public |
|
655 |
--> |
|
656 |
<condition property="download.release.service" value="${s60.grace.service}"> |
|
657 |
<isset property="s60.grace.service" /> |
|
658 |
</condition> |
|
659 |
||
217 | 660 |
<!--* @property s60.grace.server |
628 | 661 |
UNC path to file server. |
217 | 662 |
@type string |
663 |
@editable required |
|
664 |
@scope public |
|
645 | 665 |
@deprecated since 12.0 |
217 | 666 |
--> |
645 | 667 |
<!--* @property download.release.server |
668 |
UNC path to file server. |
|
217 | 669 |
@type string |
670 |
@editable required |
|
671 |
@scope public |
|
672 |
--> |
|
645 | 673 |
<condition property="download.release.server" value="${s60.grace.server}"> |
674 |
<isset property="s60.grace.server" /> |
|
675 |
</condition> |
|
676 |
||
217 | 677 |
<!--* @property s60.grace.product |
628 | 678 |
Product to look into. |
217 | 679 |
@type string |
680 |
@editable required |
|
681 |
@scope public |
|
645 | 682 |
@deprecated since 12.0 |
217 | 683 |
--> |
645 | 684 |
<!--* @property download.release.product |
685 |
Product to look into. |
|
686 |
@type string |
|
687 |
@editable required |
|
688 |
@scope public |
|
689 |
--> |
|
690 |
<condition property="download.release.product" value="${s60.grace.product}"> |
|
691 |
<isset property="s60.grace.product" /> |
|
692 |
</condition> |
|
693 |
||
217 | 694 |
<!--* @property s60.grace.release |
628 | 695 |
Regular expression to match a particular realease. |
217 | 696 |
@type string |
697 |
@editable required |
|
698 |
@scope public |
|
645 | 699 |
@deprecated since 12.0 |
700 |
--> |
|
701 |
||
702 |
<!--* @property download.release.regex |
|
703 |
Regular expression to match a particular realease. |
|
704 |
@type string |
|
705 |
@editable required |
|
706 |
@scope public |
|
217 | 707 |
--> |
645 | 708 |
<condition property="download.release.regex" value="${s60.grace.release}"> |
709 |
<isset property="s60.grace.release" /> |
|
710 |
</condition> |
|
711 |
||
712 |
<!-- Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ |
|
713 |
@type string |
|
714 |
@editable required |
|
715 |
@scope public |
|
716 |
@deprecated since 12.0 |
|
717 |
--> |
|
718 |
<property name="s60.grace.release.fixbuildregex" value="_(.*?)$" /> |
|
719 |
||
720 |
<!-- Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ |
|
217 | 721 |
@type string |
722 |
@editable required |
|
723 |
@scope public |
|
724 |
--> |
|
645 | 725 |
<property name="download.release.fixbuildregex" value="${s60.grace.release.fixbuildregex}" /> |
726 |
||
217 | 727 |
<!--* @property s60.grace.cache |
645 | 728 |
Location of the result cache for a builder. |
729 |
@type string |
|
730 |
@editable required |
|
731 |
@scope public |
|
732 |
@deprecated since 12.0 |
|
733 |
--> |
|
734 |
<!--* @property download.release.cache |
|
735 |
Location of the result cache for a builder. |
|
217 | 736 |
@type string |
737 |
@editable required |
|
738 |
@scope public |
|
739 |
--> |
|
645 | 740 |
<condition property="download.release.cache" value="${s60.grace.cache}"> |
741 |
<isset property="s60.grace.cache" /> |
|
742 |
</condition> |
|
628 | 743 |
|
744 |
<!--* @property s60.grace.checkmd5.enabled |
|
745 |
Enable MD5 validation for release metadata (default: false). |
|
217 | 746 |
@type boolean |
747 |
@editable required |
|
748 |
@scope public |
|
645 | 749 |
@deprecated since 12.0 |
217 | 750 |
--> |
645 | 751 |
<!--* @property download.release.checkmd5.enabled |
752 |
Enable MD5 validation for release metadata (default: false). |
|
628 | 753 |
@type boolean |
645 | 754 |
@editable required |
755 |
@scope public |
|
628 | 756 |
--> |
645 | 757 |
|
217 | 758 |
<!--* @property s60.grace.revision |
759 |
Defined the regular expression to find a particular revision. |
|
760 |
@type string |
|
761 |
@editable required |
|
762 |
@scope public |
|
645 | 763 |
@deprecated since 12.0 |
764 |
--> |
|
765 |
<!--* @property download.release.revision |
|
766 |
Defined the regular expression to find a particular revision. |
|
767 |
@type string |
|
768 |
@editable required |
|
769 |
@scope public |
|
217 | 770 |
--> |
645 | 771 |
<condition property="download.release.revision" value="${s60.grace.revision}"> |
772 |
<isset property="s60.grace.revision" /> |
|
773 |
</condition> |
|
774 |
||
217 | 775 |
<!--* @property s60.grace.usetickler |
628 | 776 |
Enable the detection of ready release using release tickler mechanism. |
587 | 777 |
@type boolean |
217 | 778 |
@editable required |
779 |
@scope public |
|
645 | 780 |
@deprecated since 12.0 |
217 | 781 |
--> |
645 | 782 |
<!--* @property download.release.usetickler |
783 |
Enable the detection of ready release using release tickler mechanism. |
|
784 |
@type string |
|
785 |
@editable required |
|
786 |
@scope public |
|
787 |
--> |
|
788 |
<condition property="download.release.usetickler" value="${s60.grace.usetickler}"> |
|
789 |
<isset property="s60.grace.usetickler" /> |
|
790 |
</condition> |
|
628 | 791 |
|
645 | 792 |
<condition property="internal.release.checkmd5.enabled" else="false" value="true"> |
628 | 793 |
<or> |
794 |
<istrue value="${s60.grace.checkmd5.enabled}"/> |
|
645 | 795 |
<istrue value="${download.release.checkmd5.enabled}"/> |
628 | 796 |
</or> |
797 |
</condition> |
|
798 |
<!-- Checks the contents from the release. --> |
|
645 | 799 |
<target name="ido-check-latest-release-network" unless="internal.dragonfly.enabled"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
800 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
801 |
import os |
179 | 802 |
import idoprep |
645 | 803 |
from com.nokia.ant.util import Helper |
804 |
result = idoprep.get_s60_env_details(Helper.getProperty(project, 'download.release.server'), Helper.getProperty(project, 'download.release.service'), Helper.getProperty(project, 'download.release.product'), Helper.getProperty(project, 'download.release.regex'), project.getProperty('download.release.revision'), project.getProperty('download.release.cache'), project.getProperty('internal.release.checkmd5.enabled'), project.getProperty('download.release.usetickler')) |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
805 |
resultname = os.path.basename(result[0]) |
179 | 806 |
project.setProperty('s60.getenv.path', str(result[0])) |
807 |
project.setProperty('s60.getenv.release', str(resultname)) |
|
808 |
version = idoprep.get_version(project.getProperty('build.drive'), resultname) |
|
809 |
if version is None or version.strip() != resultname: |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
810 |
project.setProperty('s60.getenv.update', "1") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
811 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
812 |
</target> |
645 | 813 |
|
814 |
<!-- Replaced by ido-update-build-area-network. |
|
815 |
@deprecated since 12.0 |
|
816 |
--> |
|
817 |
<target name="ido-update-build-area-grace" depends="ido-update-build-area-network"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
818 |
|
628 | 819 |
<!-- Updates the build area from either a network drive or Dragonfly server.--> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
820 |
<target name="ido-update-build-area" depends="backup-subst-drives,ido-update-build-area-grace" unless="env.HLM_SUBCON"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
821 |
<runtarget target="ido-update-build-area-dragonfly"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
822 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
823 |
|
628 | 824 |
<!-- Creates the build area by getting the contents from the release.--> |
645 | 825 |
<target name="ido-update-build-area-network" if="s60.getenv.update" depends="ido-check-latest-release" unless="internal.dragonfly.enabled"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
826 |
<!-- Just get S60 for IDOs --> |
645 | 827 |
<echo>Location of the new release:${s60.getenv.path}</echo> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
828 |
<tstamp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
829 |
<format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
830 |
</tstamp> |
587 | 831 |
<!-- For linux build prep.build.dir value should not be changed as |
832 |
as prep.build.dir <==> build.drive --> |
|
833 |
<condition property="ba.root.dir" value="${prep.build.dir}" else="${prep.root.dir}/${getenv.tstamp}_${s60.getenv.release}"> |
|
834 |
<os family="unix"/> |
|
835 |
</condition> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
836 |
<antcall target="init-drive"> |
587 | 837 |
<param name="prep.build.dir" location="${ba.root.dir}"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
838 |
</antcall> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
839 |
<antcall target="preparation-getenv"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
840 |
<param name="base_release.path" value="${s60.getenv.path}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
841 |
</antcall> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
842 |
<antcall target="ido-prep-variant"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
843 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
844 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
845 |
<not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
846 |
<hlm:hasSeverity severity="error" file="${build.cache.log.dir}/${build.id}_getenv.log.xml" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
847 |
</not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
848 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
849 |
<hlm:python> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
850 |
from path import path |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
851 |
print "Writing version file...." |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
852 |
vfile = path(r'${build.drive}'+"/").joinpath('s60_version.txt') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
853 |
f = open(str(vfile), 'w') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
854 |
f.write(path(r'${s60.getenv.path}').name) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
855 |
f.close() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
856 |
</hlm:python> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
857 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
858 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
859 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
860 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
861 |
<!-- Gets the Contents for particular variant, by unpacking the variant zip from the metadata file.--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
862 |
<target name="ido-prep-variant" if="ido.variant"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
863 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
864 |
import re |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
865 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
866 |
import symrec |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
867 |
from com.nokia.ant.util import Helper |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
868 |
rel_path = Helper.getProperty(project, 's60.getenv.path') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
869 |
metadata = symrec.find_latest_metadata(str(rel_path)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
870 |
self.log(str("Release metadata file: %s." % metadata)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
871 |
rel_metadata = symrec.ReleaseMetadata(metadata) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
872 |
variant_pkg = rel_metadata.getVariantPackage(project.getProperty('ido.variant')) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
873 |
project.setProperty('ido.variant.package', os.path.join(rel_path, variant_pkg)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
874 |
</script> |
645 | 875 |
<unzip src="${ido.variant.package}" dest="${build.drive}/"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
876 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
877 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
878 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
879 |
<!-- This target will help CI tool to trigger a build by updating a 's60.getenv.trigger.location' file timestamp. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
880 |
<target name="ido-latest-release-trigger" if="s60.getenv.update" depends="ido-check-latest-release"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
881 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
882 |
<isset property="s60.getenv.trigger.location"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
883 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
884 |
<echo>Touching the trigger.</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
885 |
<touch file="${s60.getenv.trigger.location}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
886 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
887 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
888 |
<echo>Property s60.getenv.trigger.location is not defined, trigger will not get updated.</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
889 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
890 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
891 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
892 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
893 |
<!-- Convert keys of an ini file into a path structure. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
894 |
e.g: <pre><hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/></pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
895 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
896 |
Usage example: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
897 |
<pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
898 |
<target name="test-iniKeys2Path" depends="ido-create-ado-mapping"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
899 |
<hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
900 |
<hlm:codescanner dest="${build.drive}/codescanner"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
901 |
<path refid="ado.src.path"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
902 |
</hlm:codescanner> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
903 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
904 |
</pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
905 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
906 |
<scriptdef name="iniKeys2Path" language="beanshell" uri="http://www.nokia.com/helium"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
907 |
<attribute name="ini"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
908 |
<attribute name="pathid"/> |
628 | 909 |
if (attributes.get("ini") == null) { |
910 |
throw new org.apache.tools.ant.BuildException("ini is not defined"); |
|
911 |
} |
|
912 |
if (attributes.get("pathid") == null) { |
|
913 |
throw new org.apache.tools.ant.BuildException("pathid is not defined"); |
|
914 |
} |
|
915 |
try { |
|
916 |
java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini")); |
|
917 |
java.util.Properties props = new java.util.Properties(); |
|
918 |
props.load(pin); |
|
919 |
org.apache.tools.ant.types.Path path = project.createDataType("path"); |
|
920 |
for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { |
|
921 |
org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement(); |
|
922 |
pe.setPath(i.next()); |
|
923 |
} |
|
924 |
self.log("Creating reference: " + attributes.get("pathid")); |
|
925 |
project.addReference(attributes.get("pathid"), path); |
|
926 |
} |
|
927 |
catch (java.io.IOException e) { |
|
928 |
throw new org.apache.tools.ant.BuildException(e); |
|
929 |
} |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
930 |
</scriptdef> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
931 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
932 |
<!-- Target to get the Substituted drives information--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
933 |
<target name="backup-subst-drives"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
934 |
<exec dir="${cache.dir}" executable="subst.exe" osfamily="windows" output="${cache.dir}\hlmsubsteddrives.bat" failonerror="false"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
935 |
<trycatch property="backup-subst-drives.exception"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
936 |
<try> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
937 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
938 |
<available file="${cache.dir}/hlmsubsteddrives.bat" type="file"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
939 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
940 |
<replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="\\: => " replace=" " flags="g" byline="true"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
941 |
<replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="\A" replace="subst.exe " byline="true"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
942 |
<replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="UNC" replace="\\\\" byline="true"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
943 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
944 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
945 |
</try> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
946 |
<catch> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
947 |
<echo>${backup-subst-drives.exception}</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
948 |
</catch> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
949 |
</trycatch> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
950 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
951 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
952 |
<import file="ci.ant.xml"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
953 |
</project> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
954 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
955 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
956 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
957 |