author | Bob Rosenberg <bob.rosenberg@nokia.com> |
Mon, 20 Sep 2010 10:55:43 +0100 | |
changeset 658 | cab9da9b71bb |
parent 628 | 7c4a911dc066 |
child 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 |
|
217 | 33 |
<!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA. |
34 |
@type string |
|
35 |
@scope private |
|
36 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
37 |
<property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/> |
217 | 38 |
<!-- 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. |
39 |
@type string |
|
40 |
@scope private |
|
41 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
42 |
<property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/> |
217 | 43 |
<!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include" |
44 |
@type string |
|
45 |
@scope private |
|
46 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
47 |
<property name="ido.romtree" location="${build.drive}${env.EPOCROOT}/epoc32/rom/include" /> |
217 | 48 |
<!-- Path to the cenrep root. Default value is "${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src" |
49 |
@type string |
|
50 |
@scope private |
|
51 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
52 |
<property name="ido.cenrep.root" location="${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src" /> |
217 | 53 |
<!-- Path to the cenrep target directory. Default value is "${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9" |
54 |
@type string |
|
55 |
@scope private |
|
56 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
57 |
<property name="ido.cenrep.target" value="${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9" /> |
217 | 58 |
<!-- Defines the location of Codescanner output. |
59 |
@type string |
|
60 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
61 |
<property name="ido.codescanner.output.dir" location="${build.output.dir}/${build.id}_codescanner"/> |
588 | 62 |
|
63 |
<!-- Defines the location of CMT++ output and the input for the diamonds creation target. |
|
64 |
@type string |
|
65 |
--> |
|
66 |
<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
|
67 |
|
628 | 68 |
<!--* @property package.cone.validation.enabled |
69 |
Enables to run confml file validation. |
|
70 |
@type boolean |
|
71 |
@editable required |
|
72 |
@scope public |
|
73 |
@since 11.0 |
|
74 |
--> |
|
75 |
||
76 |
<!--* @property internal.package.cone.validation.enabled |
|
77 |
Enables the targets to run confml file validation if package.cone.validation.enabled set to true. |
|
78 |
@type boolean |
|
79 |
@scope private |
|
80 |
--> |
|
81 |
||
82 |
<!--* @property cmt.enabled |
|
83 |
Enables to run cmt, testing code coverage tool. |
|
84 |
@type boolean |
|
85 |
@editable required |
|
86 |
@scope public |
|
87 |
@since 11.0 |
|
88 |
--> |
|
89 |
||
90 |
<!--* @property internal.cmt.enabled |
|
91 |
Enables to run cmt tools targets if cmt.enabled is set to true, testing code coverage tool. |
|
92 |
@type boolean |
|
93 |
@scope private |
|
94 |
--> |
|
95 |
||
96 |
<!--* @property enable.cmt |
|
97 |
Enables to run cmt, testing code coverage tool. - deprecated: Start using cmt.enabled property. |
|
98 |
@type boolean |
|
99 |
@editable required |
|
100 |
@scope public |
|
101 |
@deprecated since 11.0 |
|
102 |
--> |
|
103 |
||
104 |
<!--* Enables codescanner tool to run. |
|
105 |
@type boolean |
|
106 |
@editable required |
|
107 |
@scope public |
|
108 |
@since 11.0 |
|
109 |
--> |
|
110 |
<property name="codescanner.enabled" value="true"/> |
|
111 |
||
112 |
||
113 |
<!--* @property internal.codescanner.enabled |
|
114 |
Enables codescanner targets to run if codescanner.enabled is set to true. |
|
115 |
@type boolean |
|
116 |
@scope private |
|
117 |
--> |
|
118 |
||
119 |
<!--* @property skip.codescanner |
|
120 |
Enables codescanner tool to run. - deprecated: Start using codescanner.enabled property. |
|
121 |
@type boolean |
|
122 |
@editable required |
|
123 |
@scope public |
|
124 |
@deprecated since 11.0 |
|
125 |
--> |
|
126 |
||
127 |
<!-- Set to true to keep old sources of build area. |
|
128 |
@type boolean |
|
129 |
@editable required |
|
130 |
@scope public |
|
131 |
@since 11.0 |
|
132 |
--> |
|
133 |
<property name="keep.old.source.enabled" value="false"/> |
|
134 |
||
135 |
<!--* @property ido.keep.old |
|
136 |
Set to true to keep old sources of build area. - deprecated: Start using keep.old.source.enabled property. |
|
137 |
@type boolean |
|
138 |
@editable required |
|
139 |
@scope public |
|
140 |
@deprecated since 11.0 |
|
141 |
--> |
|
142 |
||
143 |
<!-- Set to true to copy internal folders while coping source from wa to build area. |
|
144 |
@type boolean |
|
145 |
@editable required |
|
146 |
@scope public |
|
147 |
@since 11.0 |
|
148 |
--> |
|
149 |
<property name="keep.internal.folders.enabled" value="false"/> |
|
150 |
||
151 |
<!--* @property keep.internals |
|
152 |
Set to true to keep old internal folder while coping source from wa to build area. - deprecated: Start using keep.internal.folders.enabled property. |
|
153 |
@type boolean |
|
154 |
@editable required |
|
155 |
@scope public |
|
156 |
@deprecated since 11.0 |
|
157 |
--> |
|
158 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
159 |
<!-- Internal target that generates the '''ado.mapping.file'''. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
160 |
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
|
161 |
--> |
628 | 162 |
|
163 |
<!-- To enable to confml file validation --> |
|
164 |
<condition property="internal.package.cone.validation.enabled"> |
|
165 |
<istrue value="${package.cone.validation.enabled}" /> |
|
166 |
</condition> |
|
167 |
||
168 |
<!-- check, is cmt enabled --> |
|
169 |
<condition property="internal.cmt.enabled"> |
|
170 |
<or> |
|
171 |
<istrue value="${cmt.enabled}" /> |
|
172 |
<isset property="enable.cmt"/> |
|
173 |
</or> |
|
174 |
</condition> |
|
175 |
||
176 |
<!-- check is codescanner enabled--> |
|
177 |
<condition property="internal.codescanner.enabled"> |
|
178 |
<and> |
|
179 |
<not> |
|
180 |
<isfalse value="${codescanner.enabled}" /> |
|
181 |
</not> |
|
182 |
<not> |
|
183 |
<isset property="skip.codescanner"/> |
|
184 |
</not> |
|
185 |
</and> |
|
186 |
</condition> |
|
187 |
||
587 | 188 |
<target name="ido-create-ado-mapping"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
189 |
<mkdir dir="${build.output.dir}/build"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
190 |
<mkdir dir="${temp.build.dir}"/> |
587 | 191 |
<if> |
628 | 192 |
<istrue value="${sysdef3.enabled}" /> |
587 | 193 |
<then> |
194 |
<hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.mapping.file}"> |
|
195 |
<path refid="system.definition.files" /> |
|
196 |
</hlm:createPackageMapping> |
|
197 |
<if> |
|
198 |
<isreference refid="ado.quality.dirs" /> |
|
199 |
<then> |
|
200 |
<hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.quality.mapping.file}" |
|
201 |
filterDirSet="ado.quality.dirs" > |
|
202 |
<path refid="system.definition.files" /> |
|
203 |
</hlm:createPackageMapping> |
|
204 |
</then> |
|
205 |
<else> |
|
206 |
<copy file="${ado.mapping.file}" tofile="${ado.quality.mapping.file}" overwrite="true" /> |
|
207 |
</else> |
|
208 |
</if> |
|
209 |
</then> |
|
210 |
<else> |
|
211 |
<tempfile property="prep.dynamic.sysdef.config" suffix=".txt" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
212 |
<trycatch property="error.message"> |
|
213 |
<try> |
|
214 |
<hlm:referenceToFileMacro refid="system.definition.files" output="${prep.dynamic.sysdef.config}"/> |
|
215 |
</try> |
|
216 |
<catch> |
|
217 |
<propertyregex property="message" input="${error.message}" |
|
218 |
regexp=":(.*)$" |
|
219 |
select="\1" casesensitive="false" /> |
|
220 |
<fail message="Error: ${message}" /> |
|
221 |
</catch> |
|
222 |
</trycatch> |
|
223 |
<trycatch> |
|
224 |
<try> |
|
225 |
<pathconvert pathsep="," property="ado.quality.dirs.path"> |
|
226 |
<dirset refid="ado.quality.dirs"/> |
|
227 |
</pathconvert> |
|
228 |
</try> |
|
229 |
</trycatch> |
|
230 |
<script language="jython" setbeans="false"> |
|
179 | 231 |
import idoprep |
232 |
idoprep.create_ado_mapping(project.getProperty(r"prep.dynamic.sysdef.config"), project.getProperty(r"ado.mapping.file"), project.getProperty(r"ado.quality.mapping.file"), project.getProperty(r"build.drive"), project.getProperty("ado.quality.dirs.path")) |
|
587 | 233 |
</script> |
234 |
</else> |
|
235 |
</if> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
236 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
237 |
|
179 | 238 |
<!-- Target to generate cenreps using cone tool --> |
239 |
<target name="ido-gen-cenrep"> |
|
217 | 240 |
<mkdir dir="${post.log.dir}" /> |
628 | 241 |
<mkdir dir="${temp.build.dir}" /> |
242 |
<tempfile property="cenrep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
243 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cenrep-gen.xml.ftl" |
|
244 |
outputfile="${cenrep.dynamic.config}"> |
|
245 |
<data expandProperties="yes"> |
|
246 |
dbPath: ${metadata.dbfile} |
|
247 |
ant: antProperties() |
|
248 |
os: eval('System.getProperty("os.name")') |
|
249 |
</data> |
|
250 |
</fmpp> |
|
251 |
<ant antfile="${cenrep.dynamic.config}"/> |
|
217 | 252 |
<copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false"> |
179 | 253 |
<filterchain> |
254 |
<linecontainsregexp> |
|
255 |
<regexp pattern="^\s*Generating file"/> |
|
256 |
</linecontainsregexp> |
|
257 |
</filterchain> |
|
258 |
</copy> |
|
259 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
|
260 |
<hlm:textmetadatainput> |
|
261 |
<fileset casesensitive="false" file="${post.log.dir}/${build.id}_cenrep.cone.log" /> |
|
262 |
<metadatafilterset> |
|
263 |
<metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" /> |
|
264 |
<metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" /> |
|
265 |
<metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" /> |
|
266 |
</metadatafilterset> |
|
267 |
</hlm:textmetadatainput> |
|
268 |
</hlm:metadatarecord> |
|
628 | 269 |
<hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_cenrep.cone.log" database="${metadata.dbfile}" property="cone.error.total"/> |
179 | 270 |
<echo>ConE error: ${cone.error.total}</echo> |
628 | 271 |
<hlm:generateBuildStatus file="${post.log.dir}/${build.id}_cenrep.cone.log" /> |
179 | 272 |
</target> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
273 |
|
628 | 274 |
<!-- To validate confml files of packages.--> |
275 |
<target name="ido-validate-confml" if="internal.package.cone.validation.enabled"> |
|
276 |
<mkdir dir="${post.log.dir}" /> |
|
277 |
<mkdir dir="${temp.build.dir}" /> |
|
278 |
<tempfile property="confml.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
279 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-confml-validate.ant.xml.ftl" |
|
280 |
outputfile="${confml.dynamic.config}"> |
|
281 |
<data expandProperties="yes"> |
|
282 |
dbPath: ${metadata.dbfile} |
|
283 |
ant: antProperties() |
|
284 |
os: eval('System.getProperty("os.name")') |
|
285 |
</data> |
|
286 |
</fmpp> |
|
287 |
<trycatch property="confml.validate.thrown"> |
|
288 |
<try> |
|
289 |
<ant antfile="${confml.dynamic.config}"/> |
|
290 |
</try> |
|
291 |
<catch> |
|
292 |
<fail message="${confml.validate.thrown}"/> |
|
293 |
</catch> |
|
294 |
<finally> |
|
295 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
|
296 |
<hlm:textmetadatainput> |
|
297 |
<fileset dir="" casesensitive="false" file="${post.log.dir}/${build.id}_validate_confml.log" /> |
|
298 |
<metadatafilterset> |
|
299 |
<metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" /> |
|
300 |
<metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" /> |
|
301 |
<metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" /> |
|
302 |
<metadatafilter priority="error" regex="\s*[1-9]\d*\s*problem\(s\).*?" description="cone validation error" /> |
|
303 |
</metadatafilterset> |
|
304 |
</hlm:textmetadatainput> |
|
305 |
</hlm:metadatarecord> |
|
306 |
<hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_validate_confml.log" database="${metadata.dbfile}" property="confml.validate.error.total"/> |
|
307 |
<echo>ConE error: ${confml.validate.error.total}</echo> |
|
308 |
<hlm:generateBuildStatus file="${build.id}_validate_confml.log" /> |
|
309 |
<hlm:signalMacro logfile="${post.log.dir}/${build.id}_validate_confml.log" phase="post" signal.input="ConEValidateSignalInput" /> |
|
310 |
</finally> |
|
311 |
</trycatch> |
|
312 |
||
313 |
</target> |
|
587 | 314 |
|
628 | 315 |
|
316 |
<!--* Defines which template to use in order to achive the package copying. |
|
317 |
@type string |
|
587 | 318 |
@scope public |
319 |
--> |
|
320 |
<property name="ido.prep.copy.template" location="${helium.dir}/tools/common/templates/ido/ido-ant-copy.xml.ftl" /> |
|
321 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
322 |
<!-- 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
|
323 |
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
|
324 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
325 |
By default it deletes the previous content. If you want to backup what was previoulsy used please |
628 | 326 |
defined '''keep.old.source.enabled''' property. |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
327 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
328 |
<target name="ido-prep-copy" depends="ido-create-ado-mapping"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
329 |
<mkdir dir="${temp.build.dir}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
330 |
<tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
587 | 331 |
<fmpp sourceFile="${ido.prep.copy.template}" |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
332 |
outputFile="${prep.dynamic.config}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
333 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
334 |
inputfile: antProperty(ado.mapping.file) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
335 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
336 |
data: eval(' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
337 |
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
|
338 |
java.util.Properties props = new java.util.Properties(); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
339 |
props.load(pin); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
340 |
return props; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
341 |
', {filename:get(inputfile)}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
342 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
343 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
344 |
<ant antfile="${prep.dynamic.config}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
345 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
346 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
347 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
348 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
349 |
Run cleanup system definition configuration. The configuration name are |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
350 |
generated from the '''sysdef.configurations.list''' property, appending '_clean' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
351 |
at the end of each configuration also reversing their build order. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
352 |
if '''sysdef.clean.configurations.list''' is defined it overrides |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
353 |
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
|
354 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
355 |
<target name ="ido-prep-clean"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
356 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
357 |
<not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
358 |
<isset property="sysdef.clean.configurations.list"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
359 |
</not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
360 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
361 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
362 |
<isset property="sysdef.configurations.list"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
363 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
364 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
365 |
rev_names = "" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
366 |
for sysdef in project.getProperty("sysdef.configurations.list").split(","): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
367 |
rev_names = sysdef + "_clean," + rev_names; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
368 |
project.setProperty("sysdef.clean.configurations.list", rev_names) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
369 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
370 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
371 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
372 |
<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
|
373 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
374 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
375 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
376 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
377 |
|
628 | 378 |
<antcall target="compile-main" inheritRefs="true"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
379 |
<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
|
380 |
<param name="compile.signal.input" value="compileCleanSignalInput"/> |
628 | 381 |
<param name="internal.compile.discard.result.enabled" value="true"/> |
382 |
<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
|
383 |
</antcall> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
384 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
385 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
386 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
387 |
This targets run the codescanner application on each discovered ADO. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
388 |
The location of the output is defined byt '''ido.codescanner.output.dir''' property. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
389 |
And the type is defined by '''ido.codescanner.output.type''' (default is HTML). |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
390 |
--> |
628 | 391 |
<target name="ido-codescanner" depends="ido-create-ado-mapping" if="internal.codescanner.enabled"> |
392 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
393 |
<!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/--> |
217 | 394 |
<!-- Defines the format of Codescanner output (html|xml|std). |
395 |
@type string |
|
396 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
397 |
<property name="ido.codescanner.output.type" value="html"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
398 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
399 |
""" internal.codescanner.drive """ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
400 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
401 |
import fileutils |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
402 |
import configuration |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
403 |
import pathaddition.relative |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
404 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
405 |
config = configuration.PropertiesConfiguration(stream=open(str(project.getProperty("ado.quality.mapping.file")), 'r')) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
406 |
prefix = pathaddition.relative.commonprefix(config.keys()) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
407 |
if not os.path.exists(prefix): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
408 |
raise Exception("Could not find common prefix for the following paths:\n" + "\n".join(config.keys())) |
587 | 409 |
if os.sep == '\\': |
410 |
self.log(str('Substing %s' % prefix)) |
|
411 |
drive = fileutils.get_next_free_drive() |
|
412 |
fileutils.subst(drive, prefix) |
|
413 |
else: |
|
414 |
drive = prefix |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
415 |
project.setProperty('internal.codescanner.drive', drive) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
416 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
417 |
# creating the structure form subst drive. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
418 |
path = project.createDataType("path") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
419 |
for location in config.keys(): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
420 |
self.log(str("From %s" % location)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
421 |
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
|
422 |
self.log(str("To %s" % location)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
423 |
pe = path.createPathElement() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
424 |
pe.setPath(location) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
425 |
project.addReference('substed.ado.src.path', path) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
426 |
</script> |
587 | 427 |
<trycatch property="codescanner.thrown"> |
428 |
<try> |
|
429 |
<hlm:codescanner dest="${ido.codescanner.output.dir}" |
|
430 |
format="${ido.codescanner.output.type}" |
|
431 |
configuration="${ido.codescanner.config}"> |
|
432 |
<path refid="substed.ado.src.path"/> |
|
433 |
</hlm:codescanner> |
|
434 |
</try> |
|
435 |
<catch> |
|
436 |
<fail message="${codescanner.thrown}" /> |
|
437 |
</catch> |
|
438 |
<finally> |
|
439 |
<hlm:unsubst drive="${internal.codescanner.drive}"/> |
|
440 |
</finally> |
|
441 |
</trycatch> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
442 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
443 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
444 |
<!-- 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
|
445 |
1. input - files to be measured |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
446 |
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
|
447 |
3. config - input config . |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
448 |
--> |
628 | 449 |
<target name="ido-cmt" depends="ido-create-ado-mapping" if="internal.cmt.enabled"> |
450 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
451 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cmt-ant.xml.ftl" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
452 |
outputFile="${temp.build.dir}/ido-cmt.ant.xml"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
453 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
454 |
inputfile: antProperty(ado.quality.mapping.file) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
455 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
456 |
data: eval(' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
457 |
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
|
458 |
java.util.Properties props = new java.util.Properties(); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
459 |
props.load(pin); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
460 |
return props; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
461 |
', {filename:get(inputfile)}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
462 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
463 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
464 |
<ant antfile="${temp.build.dir}/ido-cmt.ant.xml"/> |
588 | 465 |
<runtarget target="cmt-generate-diamond-summary" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
466 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
467 |
|
588 | 468 |
<!-- CMT Tool target. Once the CMT tool has been run this scans the results file and puts the |
469 |
results into a .XML file in the diamonds folder ready for transmission to diamonds. |
|
470 |
The target uses the ido-cmt-summary-ant.xml.ftl file to create a file called ido-cmt-summary.ant.xml |
|
471 |
which contains 1 new target for each of the input folders found under the build area. Then the |
|
472 |
ido-cmt-summary.ant.xml file is called as an ant file and the targets executed. Each target runs |
|
473 |
the file scanner looking for CMT summary information which it extracts and writes to an |
|
474 |
XML file in the diamonds folder. |
|
475 |
--> |
|
628 | 476 |
<target name="cmt-generate-diamond-summary" if="internal.cmt.enabled"> |
477 |
||
588 | 478 |
<!--use the header.ftl template file to create the init part of the output file |
479 |
that can be copied to the final output file by the java class--> |
|
480 |
<property name="temp.diamonds.header.xml" location="${env.TEMP}/diamonds_header.xml" /> |
|
481 |
<fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" |
|
482 |
outputfile="${temp.diamonds.header.xml}" quiet="true"/> |
|
483 |
<property name="temp.diamonds.footer.xml" location="${env.TEMP}/diamonds_footer.xml" /> |
|
484 |
<fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_footer.ftl" |
|
485 |
outputfile="${temp.diamonds.footer.xml}" quiet="true"/> |
|
486 |
||
487 |
<hlm:cmtsummarytask diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}" |
|
488 |
outputFile="${diamonds.build.output.dir}/cmt_summary.xml" |
|
489 |
inputFile="${ido.cmt.html.output.dir}/CMTHTML/index.html" /> |
|
490 |
<delete file="${temp.diamonds.header.xml}" failonerror="false" /> |
|
491 |
<delete file="${temp.diamonds.footer.xml}" failonerror="false" /> |
|
492 |
||
493 |
</target> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
494 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
495 |
<!-- Internal target that generates a temporary file that allow the |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
496 |
either export of iby or either key*.xls. The generated Ant build file |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
497 |
contains two targets with copy insturctions and generic set of fileset rules. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
498 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
499 |
<target name="ido-create-copy-file" depends="ido-create-ado-mapping"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
500 |
<tempfile property="copyfile.dynamic.config" suffix=".ant.xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
501 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-export.ant.xml.ftl" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
502 |
outputFile="${copyfile.dynamic.config}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
503 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
504 |
inputfile: antProperty(ado.mapping.file) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
505 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
506 |
data: eval(' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
507 |
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
|
508 |
java.util.Properties props = new java.util.Properties(); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
509 |
props.load(pin); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
510 |
return props; |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
511 |
', {filename:get(inputfile)}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
512 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
513 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
514 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
515 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
516 |
<!-- 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
|
517 |
<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
|
518 |
<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
|
519 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
520 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
521 |
<!-- 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
|
522 |
epoc32 tree. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
523 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
524 |
<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
|
525 |
<delete dir="${ido.cenrep.root}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
526 |
<mkdir dir="${ido.cenrep.root}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
527 |
<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
|
528 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
529 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
530 |
<!-- Generated cenrep from exported keys*.xls files. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
531 |
<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
|
532 |
<delete dir="${ido.cenrep.root}/../data"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
533 |
<mkdir dir="${ido.cenrep.root}/../data"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
534 |
<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
|
535 |
<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
|
536 |
<arg value="-r"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
537 |
<arg value="${ido.cenrep.platform}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
538 |
<arg value="-d"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
539 |
<arg value="${ido.cenrep.root}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
540 |
<arg value="-rd"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
541 |
<arg value="${ido.cenrep.root}/../data"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
542 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
543 |
<!-- Copy generated files to target path --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
544 |
<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
|
545 |
<fileset dir="${ido.cenrep.root}/../data"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
546 |
<include name="*.txt"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
547 |
</fileset> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
548 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
549 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
550 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
551 |
|
628 | 552 |
<!-- Gets the contents from a network drive or Dragonfly --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
553 |
<target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
554 |
<runtarget target="ido-check-latest-release-dragonfly"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
555 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
556 |
|
217 | 557 |
<!--* @property s60.grace.server |
628 | 558 |
UNC path to file server. |
217 | 559 |
@type string |
560 |
@editable required |
|
561 |
@scope public |
|
562 |
--> |
|
563 |
<!--* @property s60.grace.service |
|
628 | 564 |
File service to look into. |
217 | 565 |
@type string |
566 |
@editable required |
|
567 |
@scope public |
|
568 |
--> |
|
569 |
<!--* @property s60.grace.product |
|
628 | 570 |
Product to look into. |
217 | 571 |
@type string |
572 |
@editable required |
|
573 |
@scope public |
|
574 |
--> |
|
575 |
<!--* @property s60.grace.release |
|
628 | 576 |
Regular expression to match a particular realease. |
217 | 577 |
@type string |
578 |
@editable required |
|
579 |
@scope public |
|
580 |
--> |
|
581 |
<!--* @property s60.grace.release.fixbuildregex |
|
628 | 582 |
Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ |
217 | 583 |
@type string |
584 |
@editable required |
|
585 |
@scope public |
|
586 |
--> |
|
587 |
<!--* @property s60.grace.cache |
|
588 |
Location of the Grace result cache for a builder. |
|
589 |
@type string |
|
590 |
@editable required |
|
591 |
@scope public |
|
592 |
--> |
|
593 |
<!--* @property s60.grace.checkmd5 |
|
628 | 594 |
Enable MD5 validation for release metadata (default: false). |
595 |
@type boolean |
|
596 |
@editable required |
|
597 |
@scope public |
|
598 |
@deprecate Since 11.0 |
|
599 |
--> |
|
600 |
||
601 |
<!--* @property s60.grace.checkmd5.enabled |
|
602 |
Enable MD5 validation for release metadata (default: false). |
|
217 | 603 |
@type boolean |
604 |
@editable required |
|
605 |
@scope public |
|
606 |
--> |
|
628 | 607 |
|
608 |
<!--* @property internal.s60.grace.checkmd5.enabled |
|
609 |
set if s60.grace.checkmd5.enabled set to true. |
|
610 |
@type boolean |
|
611 |
@scope private |
|
612 |
--> |
|
613 |
||
217 | 614 |
<!--* @property s60.grace.revision |
615 |
Defined the regular expression to find a particular revision. |
|
616 |
@type string |
|
617 |
@editable required |
|
618 |
@scope public |
|
619 |
--> |
|
620 |
<!--* @property s60.grace.usetickler |
|
628 | 621 |
Enable the detection of ready release using release tickler mechanism. |
587 | 622 |
@type boolean |
217 | 623 |
@editable required |
624 |
@scope public |
|
625 |
--> |
|
628 | 626 |
|
627 |
<!-- Check is the s60.grace.checkmd5.enabled is set --> |
|
628 |
<condition property="internal.s60.grace.checkmd5.enabled" else="false" value="true"> |
|
629 |
<or> |
|
630 |
<istrue value="${s60.grace.checkmd5.enabled}"/> |
|
631 |
<istrue value="${s60.grace.checkmd5}"/> |
|
632 |
</or> |
|
633 |
</condition> |
|
634 |
<!-- Checks the contents from the release. --> |
|
635 |
<target name="ido-check-latest-release-grace" unless="internal.dragonfly.enabled"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
636 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
637 |
import os |
179 | 638 |
import idoprep |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
639 |
|
628 | 640 |
result = idoprep.get_s60_env_details(project.getProperty('s60.grace.server'), project.getProperty('s60.grace.service'), project.getProperty('s60.grace.product'), project.getProperty('s60.grace.release'), project.getProperty('s60.grace.revision'), project.getProperty('s60.grace.cache'), project.getProperty('internal.s60.grace.checkmd5.enabled'), project.getProperty('s60.grace.usetickler')) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
641 |
resultname = os.path.basename(result[0]) |
179 | 642 |
project.setProperty('s60.getenv.path', str(result[0])) |
643 |
project.setProperty('s60.getenv.release', str(resultname)) |
|
644 |
version = idoprep.get_version(project.getProperty('build.drive'), resultname) |
|
645 |
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
|
646 |
project.setProperty('s60.getenv.update', "1") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
647 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
648 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
649 |
|
628 | 650 |
<!-- 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
|
651 |
<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
|
652 |
<runtarget target="ido-update-build-area-dragonfly"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
653 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
654 |
|
628 | 655 |
<!-- Creates the build area by getting the contents from the release.--> |
656 |
<target name="ido-update-build-area-grace" 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
|
657 |
<!-- Just get S60 for IDOs --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
658 |
<echo>Location of the new S60 release:${s60.getenv.path}</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
659 |
<tstamp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
660 |
<format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
661 |
</tstamp> |
587 | 662 |
<!-- For linux build prep.build.dir value should not be changed as |
663 |
as prep.build.dir <==> build.drive --> |
|
664 |
<condition property="ba.root.dir" value="${prep.build.dir}" else="${prep.root.dir}/${getenv.tstamp}_${s60.getenv.release}"> |
|
665 |
<os family="unix"/> |
|
666 |
</condition> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
667 |
<antcall target="init-drive"> |
587 | 668 |
<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
|
669 |
</antcall> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
670 |
<antcall target="preparation-getenv"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
671 |
<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
|
672 |
</antcall> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
673 |
<antcall target="ido-prep-variant"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
674 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
675 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
676 |
<not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
677 |
<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
|
678 |
</not> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
679 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
680 |
<hlm:python> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
681 |
from path import path |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
682 |
print "Writing version file...." |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
683 |
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
|
684 |
f = open(str(vfile), 'w') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
685 |
f.write(path(r'${s60.getenv.path}').name) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
686 |
f.close() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
687 |
</hlm:python> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
688 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
689 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
690 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
691 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
692 |
<!-- 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
|
693 |
<target name="ido-prep-variant" if="ido.variant"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
694 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
695 |
import re |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
696 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
697 |
import symrec |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
698 |
from com.nokia.ant.util import Helper |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
699 |
rel_path = Helper.getProperty(project, 's60.getenv.path') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
700 |
metadata = symrec.find_latest_metadata(str(rel_path)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
701 |
self.log(str("Release metadata file: %s." % metadata)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
702 |
rel_metadata = symrec.ReleaseMetadata(metadata) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
703 |
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
|
704 |
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
|
705 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
706 |
<unzip src="${ido.variant.package}" dest="${build.drive}${env.EPOCROOT}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
707 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
708 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
709 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
710 |
<!-- 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
|
711 |
<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
|
712 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
713 |
<isset property="s60.getenv.trigger.location"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
714 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
715 |
<echo>Touching the trigger.</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
716 |
<touch file="${s60.getenv.trigger.location}"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
717 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
718 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
719 |
<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
|
720 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
721 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
722 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
723 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
724 |
<!-- 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
|
725 |
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
|
726 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
727 |
Usage example: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
728 |
<pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
729 |
<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
|
730 |
<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
|
731 |
<hlm:codescanner dest="${build.drive}/codescanner"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
732 |
<path refid="ado.src.path"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
733 |
</hlm:codescanner> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
734 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
735 |
</pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
736 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
737 |
<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
|
738 |
<attribute name="ini"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
739 |
<attribute name="pathid"/> |
628 | 740 |
if (attributes.get("ini") == null) { |
741 |
throw new org.apache.tools.ant.BuildException("ini is not defined"); |
|
742 |
} |
|
743 |
if (attributes.get("pathid") == null) { |
|
744 |
throw new org.apache.tools.ant.BuildException("pathid is not defined"); |
|
745 |
} |
|
746 |
try { |
|
747 |
java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini")); |
|
748 |
java.util.Properties props = new java.util.Properties(); |
|
749 |
props.load(pin); |
|
750 |
org.apache.tools.ant.types.Path path = project.createDataType("path"); |
|
751 |
for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { |
|
752 |
org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement(); |
|
753 |
pe.setPath(i.next()); |
|
754 |
} |
|
755 |
self.log("Creating reference: " + attributes.get("pathid")); |
|
756 |
project.addReference(attributes.get("pathid"), path); |
|
757 |
} |
|
758 |
catch (java.io.IOException e) { |
|
759 |
throw new org.apache.tools.ant.BuildException(e); |
|
760 |
} |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
761 |
</scriptdef> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
762 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
763 |
<!-- Target to get the Substituted drives information--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
764 |
<target name="backup-subst-drives"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
765 |
<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
|
766 |
<trycatch property="backup-subst-drives.exception"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
767 |
<try> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
768 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
769 |
<available file="${cache.dir}/hlmsubsteddrives.bat" type="file"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
770 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
771 |
<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
|
772 |
<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
|
773 |
<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
|
774 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
775 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
776 |
</try> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
777 |
<catch> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
778 |
<echo>${backup-subst-drives.exception}</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
779 |
</catch> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
780 |
</trycatch> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
781 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
782 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
783 |
<import file="ci.ant.xml"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
784 |
</project> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
785 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
786 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
787 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
788 |