author | yiluzhu |
Wed, 28 Apr 2010 14:18:35 +0100 | |
branch | fix |
changeset 494 | 79e0aa507647 |
parent 217 | 0f5e3a7fb6af |
child 587 | 85df38eb4012 |
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 : sbs.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 compile --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
24 |
<project name="compile.sbs" 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 |
Executes compilation of a System Model of System Definition file using Symbian SBS (Raptor) tools. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
27 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
28 |
Should not be called directly but through compile-main by setting ${build.system.sbs} property. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
29 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
30 |
Example: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
31 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
32 |
hlm -Dsysdef.configurations.list=ALL -Dbuild.system=sbs compile-main |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
33 |
hlm "-Dsysdef.configurations.list=REALLYCLEAN,ALL" -Dbuild.system=sbs compile-main |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
34 |
</description> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
35 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
36 |
<!-- Executes compilation of a System Model of System Definition file using Symbian SBS (Raptor) tools. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
37 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
38 |
Should not be called directly but through compile-main by setting ${build.system.sbs} property. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
39 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
40 |
Example: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
41 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
42 |
hlm -Dsysdef.configurations.list=ALL -Dbuild.system=sbs compile-main |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
43 |
hlm "-Dsysdef.configurations.list=REALLYCLEAN,ALL" -Dbuild.system=sbs compile-main |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
44 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
45 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
46 |
|
217 | 47 |
<!-- skip sbs layer filtering (true) for new schema and false for schema 1.4.0 |
48 |
@type boolean |
|
49 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
50 |
<property name="skip.sbs.layer.generation" value="false" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
51 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
52 |
<!-- This target filters the canonical system definition file compare to the "raptor_${sysdef.configuration}" filter. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
53 |
<macrodef name="generate-layers" uri="http://www.nokia.com/helium"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
54 |
<sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
55 |
<echo message="canno-file:${canonical.sysdef.file}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
56 |
<echo message="raptor-filters:raptor_${sysdef.configuration}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
57 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
58 |
<istrue value="${skip.sbs.layer.generation}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
59 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
60 |
<copy file="${canonical.sysdef.file}" tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
61 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
62 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
63 |
<hlm:compileGenxmlFilterMacro input="${canonical.sysdef.file}" filter="raptor_${sysdef.configuration}" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
64 |
output="${build.output.dir}/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
65 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
66 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
67 |
<copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
68 |
tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
69 |
<filterchain> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
70 |
<linecontainsregexp negate="true"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
71 |
<regexp pattern="^\s*$"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
72 |
</linecontainsregexp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
73 |
</filterchain> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
74 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
75 |
<delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
76 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
77 |
</macrodef> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
78 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
79 |
<!-- SBS build with gmake as engine type. Default is using sbs macro, to use old implementation to |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
use using exec task, then sbs.using.exec needs to be set. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
81 |
<target name="compile-sbs" description="This is the main build that gets built for ARMV5 and WINSCW platforms"> |
179 | 82 |
<!-- only temporary once config file option starts to work, then no |
83 |
need to copy the plugin file --> |
|
84 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
85 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
86 |
<or> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
87 |
<equals arg1="${build.system}" arg2="sbs" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
88 |
<equals arg1="${build.system}" arg2="sbs-ec" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
89 |
</or> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
90 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
91 |
<echo message="Copying helium filter plugin to sbs home" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
92 |
<copy file="${helium.dir}/tools/common/python/scripts/filter_metadatalog.py" todir="${env.SBS_HOME}/python/plugins/" failonerror="true" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
93 |
<copy file="${helium.dir}/tools/common/python/scripts/sbsscanlogmetadata.py" todir="${env.SBS_HOME}/python/plugins/" failonerror="true" /> |
179 | 94 |
<echo message="sbs.patternset: ${sbs.patternset}" /> |
95 |
<hlm:generate-layers /> |
|
217 | 96 |
<var name="sbs.internal.inputs.list" value="" unset="true"/> |
97 |
<if> |
|
98 |
<istrue value="${schema.new}" /> |
|
99 |
<then> |
|
100 |
<var name="sbs.internal.inputs.list" value="${sbs.inputs.list}"/> |
|
101 |
</then> |
|
102 |
<else> |
|
103 |
<var name="sbs.internal.inputs.list" value="" unset="true"/> |
|
104 |
<hlm:getsbsinputs config="sbs.${sysdef.configuration}" outputProperty="sbs.internal.inputs.list"/> |
|
105 |
</else> |
|
106 |
</if> |
|
107 |
<for list="${sbs.internal.inputs.list}" delimiter="," param="sbs.input"> |
|
179 | 108 |
<sequential> |
109 |
<echo message="building raptor input: @{sbs.input}" /> |
|
110 |
<hlm:getVariableValue name="--logfile" property="sbs.log.file"> |
|
111 |
<hlm:sbsinput refid="@{sbs.input}" /> |
|
112 |
</hlm:getVariableValue> |
|
113 |
<!-- run arm license checking / setting arm version only for arm config --> |
|
114 |
<hlm:getVariableValue name="-c" property="compilevalue.var" failOnerror="false"> |
|
115 |
<hlm:sbsinput refid="@{sbs.input}" /> |
|
116 |
</hlm:getVariableValue> |
|
117 |
<echo message="config parameter -c : ${compilevalue.var}" /> |
|
118 |
<if> |
|
119 |
<and> |
|
120 |
<isset property="compilevalue.var"/> |
|
121 |
<matches string="${compilevalue.var}" pattern="arm.*"/> |
|
122 |
</and> |
|
123 |
<then> |
|
124 |
<runtarget target="set-arm-version"/> |
|
125 |
</then> |
|
126 |
</if> |
|
127 |
<var name="sbs.clean.log" value="${sbs.log.file}.clean.log"/> |
|
217 | 128 |
<var name="sbs.what.log" value="${sbs.log.file}.whatlog.log"/> |
179 | 129 |
<!-- Generate the filtered layers --> |
217 | 130 |
<if> |
131 |
<isset property="run.coverity"/> |
|
132 |
<then> |
|
133 |
<hlm:coveritybuild sbsinput="@{sbs.input}" |
|
134 |
sysdeffile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" |
|
135 |
layerpatternsetref="${sbs.patternset}" |
|
136 |
workingdir="${build.drive}/" |
|
137 |
execute="true" |
|
138 |
failonerror="false" |
|
139 |
outputlog="${sbs.log.file}" |
|
140 |
cleanlog = "${sbs.clean.log}" |
|
141 |
whatlog = "${sbs.what.log}" |
|
142 |
erroroutput="${sbs.log.file}.sbs_error.log" |
|
143 |
statslog="${sbs.log.file}.info.xml"> |
|
144 |
<hlm:coverityoptions refid="coverity.build.options"/> |
|
145 |
</hlm:coveritybuild> |
|
146 |
</then> |
|
147 |
<elseif> |
|
148 |
<istrue value="${sbs.build.ctc}"/> |
|
149 |
<then> |
|
150 |
<hlm:ctctask sbsinput="@{sbs.input}" |
|
151 |
sysdefFile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" |
|
152 |
layerPatternSetRef="${sbs.patternset}" |
|
153 |
errorOutput="${sbs.log.file}.sbs_error.log" |
|
154 |
workingDir="${build.drive}/" |
|
155 |
failOnError="false" |
|
156 |
outputLog="${sbs.log.file}" |
|
157 |
cleanLog = "${sbs.clean.log}" |
|
158 |
whatlog = "${sbs.what.log}" |
|
159 |
statsLog="${sbs.log.file}.info.xml" /> |
|
160 |
</then> |
|
161 |
</elseif> |
|
162 |
<else> |
|
163 |
<hlm:sbstask sbsinput="@{sbs.input}" |
|
164 |
sysdefFile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" |
|
165 |
layerPatternSetRef="${sbs.patternset}" |
|
166 |
errorOutput="${sbs.log.file}.sbs_error.log" |
|
167 |
workingDir="${build.drive}/" |
|
168 |
failOnError="false" |
|
169 |
outputLog="${sbs.log.file}" |
|
170 |
cleanLog = "${sbs.clean.log}" |
|
171 |
whatlog = "${sbs.what.log}" |
|
172 |
statsLog="${sbs.log.file}.info.xml" /> |
|
173 |
</else> |
|
174 |
</if> |
|
175 |
<hlm:assertFileExists file="${sbs.log.file}"/> |
|
176 |
<hlm:assertFileExists file="${sbs.clean.log}"/> |
|
177 |
<hlm:assertFileExists file="${sbs.what.log}"/> |
|
178 |
<hlm:assertFileExists file="${sbs.log.file}.sbs_error.log"/> |
|
179 |
<hlm:assertFileExists file="${sbs.log.file}.info.xml"/> |
|
179 | 180 |
<!-- run arm license checking / setting arm version only for arm config --> |
181 |
<echo message="sbs.log.file: ${sbs.log.file}" /> |
|
182 |
<hlm:sbsProcessOutputMacro sbs.log.file="${sbs.log.file}" |
|
217 | 183 |
sbs.clean.log.file="${sbs.clean.log}" sbs.what.log.file="${sbs.what.log}" |
184 |
sbs.stats.file="${sbs.log.file}.info.xml" |
|
179 | 185 |
sbs.ant.output.file="${sbs.log.file}" sbs.error.output.file="${sbs.log.file}.sbs_error.log"/> |
186 |
</sequential> |
|
187 |
</for> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
188 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
189 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
190 |
</target> |
217 | 191 |
|
192 |
||
179 | 193 |
<macrodef name="sbsProcessOutputMacro" uri="http://www.nokia.com/helium"> |
194 |
<attribute name="sbs.clean.log.file" /> |
|
217 | 195 |
<attribute name="sbs.what.log.file" /> |
179 | 196 |
<attribute name="sbs.log.file" /> |
197 |
<attribute name="sbs.stats.file" /> |
|
198 |
<attribute name="sbs.error.output.file" /> |
|
199 |
<attribute name="sbs.ant.output.file" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
200 |
<sequential> |
217 | 201 |
<var name="sbs.scan2.template" value="scan2_orm.html.ftl" /> |
202 |
<var name="base.sbs.log" value="" unset="true"/> |
|
203 |
<basename property="base.sbs.log" file="@{sbs.log.file}" /> |
|
204 |
<echo message="base.sbs.log: ${base.sbs.log}" /> |
|
179 | 205 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
206 |
<hlm:textmetadatainput> |
|
207 |
<fileset casesensitive="false" file="@{sbs.error.output.file}"/> |
|
208 |
<metadatafilterset refid="filterset.sbs" /> |
|
209 |
</hlm:textmetadatainput> |
|
210 |
</hlm:metadatarecord> |
|
211 |
<basename property="base.sbs.ant.output.log" file="@{sbs.ant.output.file}" /> |
|
212 |
<hlm:signalMacro logfile="@{sbs.error.output.file}" |
|
213 |
signal.input="raptorErrorSignalInput" phase="compile"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
214 |
<!-- update the resultes to database --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
215 |
<echo message="Metadata enabled, storing build status in database" /> |
179 | 216 |
<echo message="sbs log file :@{sbs.log.file}" /> |
217 |
<echo message="sbs.clean.log.file :@{sbs.clean.log.file}" /> |
|
217 | 218 |
<echo message="sbs.what.log.file :@{sbs.what.log.file}" /> |
179 | 219 |
<trycatch property="hlm-sbs.parser.thrown"> |
220 |
<try> |
|
217 | 221 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
222 |
<hlm:sbsmetadatainput whatLogFile="@{sbs.what.log.file}" cleanLogFile="@{sbs.clean.log.file}"> |
|
179 | 223 |
<fileset casesensitive="false" file="@{sbs.log.file}"/> |
224 |
<metadatafilterset refid="filterset.sbs" /> |
|
225 |
</hlm:sbsmetadatainput> |
|
226 |
</hlm:metadatarecord> |
|
227 |
</try> |
|
228 |
<catch> |
|
229 |
<if> |
|
230 |
<istrue value="${skip.sbs.parser.exception}" /> |
|
231 |
<then> |
|
217 | 232 |
<var name="sbs.scan2.template" value="scan2_text_orm.html.ftl" /> |
233 |
<hlm:metadatadelete database="${metadata.dbfile}"> |
|
179 | 234 |
<fileset casesensitive="false" file="@{sbs.log.file}"/> |
235 |
</hlm:metadatadelete> |
|
217 | 236 |
<hlm:metadatarecord database="${metadata.dbfile}" > |
179 | 237 |
<hlm:textmetadatainput> |
238 |
<fileset casesensitive="false" file="@{sbs.log.file}"/> |
|
217 | 239 |
<metadatafilterset refid="filterset.sbs" /> |
179 | 240 |
</hlm:textmetadatainput> |
241 |
</hlm:metadatarecord> |
|
242 |
</then> |
|
243 |
<else> |
|
244 |
<fail message="failed during raptor log parsing: might be due to invalid xml output from raptor" /> |
|
245 |
</else> |
|
246 |
</if> |
|
247 |
</catch> |
|
248 |
</trycatch> |
|
249 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/${sbs.scan2.template}" |
|
217 | 250 |
outputfile="${build.log.dir}/${base.sbs.log}.scan2.html"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
251 |
<freemarkerLinks expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
252 |
macro: ${helium.dir}/tools/common/templates/macro |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
253 |
</freemarkerLinks> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
254 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
255 |
dbPath: ${metadata.dbfile} |
179 | 256 |
doc: xml(@{sbs.stats.file}) |
217 | 257 |
whatLogPath: @{sbs.what.log.file} |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
258 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
259 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
260 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
261 |
<echo message="generating signal" /> |
217 | 262 |
<hlm:assertFileExists file="${build.log.dir}/${base.sbs.log}.scan2.html"/> |
263 |
<hlm:compileLogSignalMacro compile.summary.file="@{sbs.log.file}" |
|
179 | 264 |
error.limit="${build.errors.limit}" phase="compile"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
265 |
<!-- Blocks packaging configuration generation. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
266 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
267 |
<istrue value="${blocks.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
268 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
269 |
<mkdir dir="${blocks.config.dir}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
270 |
<exec executable="python"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
271 |
<arg value="-m"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
272 |
<arg value="packager.cli"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
273 |
<arg value="--epocroot=${build.drive}/" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
274 |
<arg value="--config=${blocks.config.dir}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
275 |
<arg value="--datasource=sbs" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
276 |
<arg value="-Dsbslog=${sbs.log.file}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
277 |
<arg value="-Dsysdef=${canonical.sysdef.file}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
278 |
<arg value="-Dthreads=20" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
279 |
<arg value="--updateData" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
280 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
281 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
282 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
283 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
284 |
</macrodef> |
217 | 285 |
|
286 |
<scriptdef language="jython" name="getSbsHome" uri="http://www.nokia.com/helium"> |
|
287 |
<attribute name="property" /> |
|
288 |
if attributes.get("property") is None: |
|
289 |
raise Exception("property attribute has not been set.") |
|
290 |
if project.getProperty(attributes.get("property")) is None: |
|
291 |
import symbian.raptor |
|
292 |
sbs_home = symbian.raptor.getSBSHome() |
|
293 |
if sbs_home is not None: |
|
294 |
#self.log("Found SBS_HOME as " + sbs_home) |
|
295 |
project.setNewProperty(attributes.get("property"), sbs_home) |
|
296 |
</scriptdef> |
|
297 |
||
179 | 298 |
</project> |