18 |
18 |
19 Description: |
19 Description: |
20 |
20 |
21 ============================================================================ |
21 ============================================================================ |
22 --> |
22 --> |
23 <project name="minibuild.compile" default="mini-build" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" basedir="."> |
23 <project name="minibuild.compile" default="minibuild" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" basedir="."> |
24 <property environment="env" /> |
24 <property environment="env" /> |
25 <import file="../site/${env.TEAM}.ant.xml" optional="true"/> |
25 <import file="../site/${env.TEAM}.ant.xml" optional="true"/> |
26 <dirname property="config.dir" file="${ant.file.minibuild.compile}" /> |
26 <dirname property="config.dir" file="${ant.file.minibuild.compile}" /> |
27 |
27 |
28 <!-- Enable Helium internal assertion checking. --> |
28 <!-- Enable Helium internal assertion checking. --> |
29 <property name="hlm.enable.asserts" value="1" /> |
29 <property name="hlm.enable.asserts" value="1" /> |
30 |
30 |
31 <property name="build.name" value="minibuild_compile" /> |
31 <property name="build.name" value="minibuild_compile" /> |
32 <property name="build.family" value="test_minibuilds" /> |
32 <property name="build.family" value="test_minibuilds" /> |
33 <property name="major.version" value="0" /> |
33 <property name="major.version" value="0" /> |
34 <property name="minor.version" value="0" /> |
34 <property name="minor.version" value="0" /> |
35 <property name="publish.root.dir" location="${build.drive}/release" /> |
35 <property name="publish.root.dir" location="${build.drive}/release" /> |
36 |
36 |
37 <!-- For Grace upload--> |
37 <!-- For Grace upload--> |
38 <property name="hydra.service" value="Helium" /> |
38 <property name="hydra.service" value="Helium" /> |
39 <property name="hydra.product" value="minibuild_compile" /> |
39 <property name="hydra.product" value="minibuild_compile" /> |
40 <property name="release.label" value="${major.version}.${minor.version}" /> |
40 <property name="release.label" value="${major.version}.${minor.version}" /> |
41 |
41 |
42 <!-- build configuration --> |
42 <!-- build configuration --> |
43 <property name="sysdef.configurations.list" value="helium_minibuild_compile" /> |
43 <property name="sysdef.configurations.list" value="helium_minibuild_compile" /> |
44 <path id="system.definition.files"> |
44 <path id="system.definition.files"> |
45 <fileset dir="." includes="*.sysdef.xml" /> |
45 <fileset dir="." includes="*.sysdef.xml" /> |
46 </path> |
46 </path> |
47 |
47 |
48 <property name="build.system" value="ec-helium" /> |
48 <property name="build.system" value="ec-helium" /> |
49 <property name="rvct.version" value="22_616" /> |
49 <property name="rvct.version" value="22_616" /> |
50 |
50 |
51 <!-- Archiving configuration--> |
51 <!-- Archiving configuration--> |
52 <property name="zip.config.file" location="archive.cfg.xml" /> |
52 <property name="zip.config.file" location="archive.cfg.xml" /> |
53 <property name="zips.ee.spec.name" value="minibuild_archive" /> |
53 <property name="zips.ee.spec.name" value="minibuild_archive" /> |
54 <property name="zips.ee-empty.spec.name" value="empty_minibuild_archive" /> |
54 <property name="zips.ee-empty.spec.name" value="empty_minibuild_archive" /> |
55 |
55 |
56 <!-- Synergy is not configured --> |
56 <!-- Synergy is not configured --> |
57 <property name="skip.password.validation" value="1" /> |
57 <property name="skip.password.validation" value="1" /> |
58 |
58 |
59 |
59 |
60 <import file="${helium.dir}/helium.ant.xml" /> |
60 <import file="${helium.dir}/helium.ant.xml" /> |
61 |
61 |
62 <!-- Run the full sequence of target for the minibuild. ,mini-build-prep,compile-main,zip-ee,mini-build-check--> |
62 <!-- Run the full sequence of target for the minibuild. ,minibuild-prep,compile-main,zip-ee,minibuild-check--> |
63 <target name="do-mini-build" depends="mini-build-cleanup,mini-build-install-new-imaker,mini-build-prep, |
63 <target name="do-minibuild" depends="minibuild-cleanup,minibuild-install-new-imaker,minibuild-prep, |
64 compile-main,test-ec-history-option,integration-mmp-to-target,mini-build-archive,build-roms, |
64 compile-main,test-ec-history-option,integration-mmp-to-target,minibuild-archive,build-roms, |
65 minibuild-release,mini-build-check" /> |
65 minibuild-check,final" /> |
66 |
66 |
67 |
67 |
68 <target name="do-mini-build-subcon" depends="mini-build-cleanup,mini-build-install-new-imaker,mini-build-prep, |
68 <target name="do-minibuild-subcon" depends="minibuild-cleanup,minibuild-install-new-imaker,minibuild-prep, |
69 compile-main,mini-build-archive,mini-build-check" /> |
69 compile-main,minibuild-archive,minibuild-check" /> |
70 |
70 |
71 <!--ant code coverage for mini-builds--> |
71 <!--ant code coverage for minibuilds--> |
72 <target name="mini-build"> |
72 <target name="minibuild"> |
73 <antcall target="database"> |
73 <antcall target="database"> |
74 <param name="home.files.only" value="false"/> |
74 <param name="home.files.only" value="false"/> |
75 </antcall> |
75 </antcall> |
76 <mkdir dir="${helium.build.dir}/temp" /> |
76 <mkdir dir="${helium.build.dir}/temp" /> |
77 <hlm:coveragerecord name="${helium.build.dir}/temp/test_minibuild.xml" action="start" /> |
77 <hlm:coveragerecord name="${helium.build.dir}/temp/test_minibuild.xml" action="start" /> |
78 <runtarget target="do-mini-build" /> |
78 <runtarget target="do-minibuild" /> |
79 <hlm:coveragerecord name="${helium.build.dir}/temp/test_minibuild.xml" action="stop" /> |
79 <hlm:coveragerecord name="${helium.build.dir}/temp/test_minibuild.xml" action="stop" /> |
80 <fmpp sourcefile="${helium.dir}/tools/common/templates/coveragerecord.txt.ftl" outputfile="${helium.build.dir}/temp/test_minibuild.txt"> |
80 <fmpp sourcefile="${helium.dir}/tools/common/templates/coveragerecord.txt.ftl" outputfile="${helium.build.dir}/temp/test_minibuild.txt"> |
81 <data expandProperties="yes"> |
81 <data expandProperties="yes"> |
82 doc: xml(${helium.build.dir}/temp/test_minibuild.xml) |
82 doc: xml(${helium.build.dir}/temp/test_minibuild.xml) |
83 database: xml(${database.file}) |
83 database: xml(${database.file}) |
84 </data> |
84 </data> |
85 </fmpp> |
85 </fmpp> |
86 <loadfile srcfile="${helium.build.dir}/temp/test_minibuild.txt" property="ant.coverage.summary" /> |
86 <loadfile srcfile="${helium.build.dir}/temp/test_minibuild.txt" property="ant.coverage.summary" /> |
87 <echo> |
87 <echo> |
88 The summary of Ant code coverage: |
88 The summary of Ant code coverage: |
89 |
89 |
90 ${ant.coverage.summary}</echo> |
90 ${ant.coverage.summary}</echo> |
91 <fmpp sourcefile="${helium.dir}/tools/common/templates/coveragerecord.html.ftl" outputfile="${helium.build.dir}/temp/test_minibuild.html"> |
91 <fmpp sourcefile="${helium.dir}/tools/common/templates/coveragerecord.html.ftl" outputfile="${helium.build.dir}/temp/test_minibuild.html"> |
92 <data expandProperties="yes"> |
92 <data expandProperties="yes"> |
93 doc: xml(${helium.build.dir}/temp/test_minibuild.xml) |
93 doc: xml(${helium.build.dir}/temp/test_minibuild.xml) |
94 database: xml(${database.file}) |
94 database: xml(${database.file}) |
95 </data> |
95 </data> |
96 </fmpp> |
96 </fmpp> |
97 </target> |
97 </target> |
98 |
98 |
99 <!-- Test ec history option is create for single node build and merge is for multinode build. --> |
99 <!-- Test ec history option is create for single node build and merge is for multinode build. --> |
100 <target name="test-ec-history-option" if="build.system.ec-helium"> |
100 <target name="test-ec-history-option" if="build.system.ec-helium"> |
101 <loadfile srcfile="${temp.build.dir}/${build.id}.${sysdef.configurations.list}_run_emake.bat" property="emake.bat.file"/> |
101 <loadfile srcfile="${temp.build.dir}/${build.id}.${sysdef.configurations.list}_run_emake.bat" property="emake.bat.file"/> |
102 <if> |
102 <if> |
103 <equals arg1="${ec.maxagents}" arg2="1" /> |
103 <equals arg1="${ec.maxagents}" arg2="1" /> |
115 <echo message="ec.mode:${ec.mode}" /> |
115 <echo message="ec.mode:${ec.mode}" /> |
116 <echo message="ec.maxagents:${ec.maxagents}"/> |
116 <echo message="ec.maxagents:${ec.maxagents}"/> |
117 <echo message="ec.history.option:${ec.history.option}"/> |
117 <echo message="ec.history.option:${ec.history.option}"/> |
118 </target> |
118 </target> |
119 |
119 |
120 <!-- Prepare the minibuild. --> |
120 <!-- Prepare the minibuild. --> |
121 <!--target name="mini-build-prep" depends="init-build-area,start-ant-log,diamonds,set-arm-version,prep-copy-symbiantools"/--> |
121 <!--target name="minibuild-prep" depends="init-build-area,start-ant-log,diamonds,set-arm-version,prep-copy-symbiantools"/--> |
122 <target name="mini-build-prep" depends="prep" /> |
122 <target name="minibuild-prep" depends="prep" /> |
123 |
123 |
124 <!-- Stubbing few targets for easy testing with dragonfly ... --> |
124 <!-- Stubbing few targets for easy testing with dragonfly ... --> |
125 <target name="prep-drive" depends="build-number" /> |
125 <target name="prep-drive" depends="build-number" /> |
126 <target name="dragonfly-prep-drive" /> |
126 <target name="dragonfly-prep-drive" /> |
127 <target name="do-prep-work-area" /> |
127 <target name="do-prep-work-area" /> |
128 <target name="create-bom" /> |
128 <target name="create-bom" /> |
129 <target name="check-env-prep" /> |
129 <target name="check-env-prep" /> |
130 <target name="prep-copy" /> |
130 <target name="prep-copy" /> |
131 |
131 |
132 <target name="minibuild-release"> |
132 <target name="minibuild-release"> |
133 <mkdir dir="${publish.release.dir}" /> |
133 <mkdir dir="${publish.release.dir}" /> |
134 <copy todir="${publish.release.dir}"> |
134 <copy todir="${publish.release.dir}"> |
135 <fileset dir="${build.output.dir}"> |
135 <fileset dir="${build.output.dir}"> |
136 <include name="release_flash_images/**" /> |
136 <include name="release_flash_images/**" /> |
137 </fileset> |
137 </fileset> |
138 </copy> |
138 </copy> |
139 <script language="jython" setbeans="false"> |
139 <script language="jython" setbeans="false"> |
140 <![CDATA[ |
140 <![CDATA[ |
141 import os |
141 import os |
142 import fileutils |
142 import fileutils |
143 import pathaddition.relative |
143 import pathaddition.relative |
144 result = [] |
144 result = [] |
145 rootdir = os.path.normpath(project.getProperty("publish.release.dir") + "/..") |
145 rootdir = os.path.normpath(project.getProperty("publish.release.dir") + "/..") |
146 |
146 |
147 def sortbydate(a, b): |
147 def sortbydate(a, b): |
148 if os.stat(a)[9] == os.stat(b)[9]: |
148 if os.stat(a)[9] == os.stat(b)[9]: |
149 return 0 |
149 return 0 |
150 elif os.stat(a)[9] < os.stat(b)[9]: |
150 elif os.stat(a)[9] < os.stat(b)[9]: |
151 return 1 |
151 return 1 |
152 return -1 |
152 return -1 |
153 |
153 |
154 if os.path.exists(rootdir): |
154 if os.path.exists(rootdir): |
155 for name in os.listdir(rootdir): |
155 for name in os.listdir(rootdir): |
156 path = os.path.join(rootdir, name) |
156 path = os.path.join(rootdir, name) |
157 if os.path.isdir(path): |
157 if os.path.isdir(path): |
158 result.append(os.path.normpath(path)) |
158 result.append(os.path.normpath(path)) |
169 project.setProperty('fota.old.publish.subdir', result[0]) |
169 project.setProperty('fota.old.publish.subdir', result[0]) |
170 project.setProperty('fota.new.publish.subdir', result[1]) |
170 project.setProperty('fota.new.publish.subdir', result[1]) |
171 print "Old subdir: %s" % old |
171 print "Old subdir: %s" % old |
172 print "New subdir: %s" % old |
172 print "New subdir: %s" % old |
173 ]]> |
173 ]]> |
174 </script> |
174 </script> |
175 </target> |
175 </target> |
176 |
176 |
177 <!-- Check that the XML data returned from Diamonds via the REST interface |
177 <!-- Check that the XML data returned from Diamonds via the REST interface |
178 is the same as what is sent. |
178 is the same as what is sent. |
179 |
179 |
180 Currently there are some differences between the formats so some edits to the |
180 Currently there are some differences between the formats so some edits to the |
181 XML content are made before using XMLUnit to compare the content. |
181 XML content are made before using XMLUnit to compare the content. |
182 --> |
182 --> |
183 <target name="check-diamonds"> |
183 <target name="check-diamonds"> |
184 <loadfile srcfile="${build.log.dir}/${build.id}_diamonds-log-start.xml" property="diamonds.log.start"> |
184 <loadfile srcfile="${build.log.dir}/${build.id}_diamonds-log-start.xml" property="diamonds.log.start"> |
185 <filterchain> |
185 <filterchain> |
186 <tokenfilter> |
186 <tokenfilter> |
187 <filetokenizer /> |
187 <filetokenizer /> |
188 <hlm:prettyprintxml /> |
188 <hlm:prettyprintxml /> |
189 </tokenfilter> |
189 </tokenfilter> |
190 </filterchain> |
190 </filterchain> |
191 </loadfile> |
191 </loadfile> |
192 <echo>Data sent to Diamonds: |
192 <echo>Data sent to Diamonds: |
193 |
193 |
194 ${diamonds.log.start}</echo> |
194 ${diamonds.log.start}</echo> |
195 <loadresource property="diamonds.log.start.output"> |
195 <loadresource property="diamonds.log.start.output"> |
196 <url url="${diamonds.build.url}?fmt=xml" /> |
196 <url url="${diamonds.build.url}?fmt=xml" /> |
197 <filterchain> |
197 <filterchain> |
198 <tokenfilter> |
198 <tokenfilter> |
199 <filetokenizer /> |
199 <filetokenizer /> |
200 <hlm:prettyprintxml /> |
200 <hlm:prettyprintxml /> |
201 </tokenfilter> |
201 </tokenfilter> |
202 </filterchain> |
202 </filterchain> |
203 </loadresource> |
203 </loadresource> |
204 <echo>Data returned from Diamonds: |
204 <echo>Data returned from Diamonds: |
205 |
205 |
206 ${diamonds.log.start.output}</echo> |
206 ${diamonds.log.start.output}</echo> |
207 <echo file="${helium.dir}/diamonds_build.xml">${diamonds.log.start}</echo> |
207 <echo file="${helium.dir}/diamonds_build.xml">${diamonds.log.start}</echo> |
208 <!--xmltask source="${helium.dir}/diamonds_build.xml" dest="${helium.dir}/diamonds_build_edit.xml"> |
208 <!--xmltask source="${helium.dir}/diamonds_build.xml" dest="${helium.dir}/diamonds_build_edit.xml"> |
209 |
209 |
210 <cut path="/diamonds-build/tool" buffer="toolElements"/> |
210 <cut path="/diamonds-build/tool" buffer="toolElements"/> |
211 <cut path="/diamonds-build/locations" buffer="temp"/> |
211 <cut path="/diamonds-build/locations" buffer="temp"/> |
212 </xmltask--> |
212 </xmltask--> |
213 <!--<loadfile srcfile="${helium.dir}/diamonds_build_edit.xml" property="diamonds.log.start.edited"/> |
213 <!--<loadfile srcfile="${helium.dir}/diamonds_build_edit.xml" property="diamonds.log.start.edited"/> |
214 <echo>Data sent massaged to match what is received: |
214 <echo>Data sent massaged to match what is received: |
215 |
215 |
216 ${diamonds.log.start.edited}</echo>--> |
216 ${diamonds.log.start.edited}</echo>--> |
217 <!-- TODO: make assertXmlEqual work with direct string input --> |
217 <!-- TODO: make assertXmlEqual work with direct string input --> |
218 <string id="control.id" value="${diamonds.log.start}" /> |
218 <string id="control.id" value="${diamonds.log.start}" /> |
219 <string id="test.id" value="${diamonds.log.start.output}" /> |
219 <string id="test.id" value="${diamonds.log.start.output}" /> |
220 <hlm:assertXmlEqual control="control.id" test="test.id" failonerror="true" /> |
220 <hlm:assertXmlEqual control="control.id" test="test.id" failonerror="true" /> |
221 </target> |
221 </target> |
222 |
222 |
223 |
223 |
224 <target name="mini-build-archive" depends="mini-build-archive-ant,mini-build-archive-ec-full,mini-build-archive-ant-empty-config" /> |
224 <target name="minibuild-archive" depends="minibuild-archive-ant,minibuild-archive-ec-full,minibuild-archive-ant-empty-config" /> |
225 |
225 |
226 <!-- This target will copy a part of the tree structure to test policy.remover mapper. --> |
226 <!-- This target will copy a part of the tree structure to test policy.remover mapper. --> |
227 <target name="prepare-archiving"> |
227 <target name="prepare-archiving"> |
228 <delete dir="${build.drive}/test_policy" failonerror="false" /> |
228 <delete dir="${build.drive}/test_policy" failonerror="false" /> |
229 <mkdir dir="${build.drive}/test_policy/os" /> |
229 <mkdir dir="${build.drive}/test_policy/os" /> |
230 <!-- Creating a policy file under the new s60 test root. --> |
230 <!-- Creating a policy file under the new s60 test root. --> |
231 <echo file="${build.drive}/test_policy/distribution.policy.s60">0</echo> |
231 <echo file="${build.drive}/test_policy/distribution.policy.s60">0</echo> |
232 <echo file="${build.drive}/test_policy/os/distribution.policy.s60">0</echo> |
232 <echo file="${build.drive}/test_policy/os/distribution.policy.s60">0</echo> |
236 <include name="os/graphics/" /> |
236 <include name="os/graphics/" /> |
237 </fileset> |
237 </fileset> |
238 </copy> |
238 </copy> |
239 </target> |
239 </target> |
240 |
240 |
241 <target name="mini-build-archive-ec-full"> |
241 <target name="minibuild-archive-ec-full"> |
242 <antcall target="do-mini-build-archive"> |
242 <antcall target="do-minibuild-archive"> |
243 <param name="build.system" value="ec-helium" /> |
243 <param name="build.system" value="ec-helium" /> |
244 <param name="archive.using.ec" value="true" /> |
244 <param name="archive.using.ec" value="true" /> |
245 <param name="zipping.type" value="ec" /> |
245 <param name="zipping.type" value="ec" /> |
246 <!-- Uses to set the target location --> |
246 <!-- Uses to set the target location --> |
247 </antcall> |
247 </antcall> |
248 </target> |
248 </target> |
249 |
249 |
250 <target name="mini-build-archive-ant"> |
250 <target name="minibuild-archive-ant"> |
251 <antcall target="do-mini-build-archive"> |
251 <antcall target="do-minibuild-archive"> |
252 <param name="build.system" value="ebs" /> |
252 <param name="build.system" value="ebs" /> |
253 <param name="archive.using.ec" value="false" /> |
253 <param name="archive.using.ec" value="false" /> |
254 <param name="zipping.type" value="ant" /> |
254 <param name="zipping.type" value="ant" /> |
255 <!-- Uses to set the target location --> |
255 <!-- Uses to set the target location --> |
256 </antcall> |
256 </antcall> |
257 |
257 |
258 </target> |
258 </target> |
259 |
259 |
260 <target name="mini-build-archive-ant-empty-config"> |
260 <target name="minibuild-archive-ant-empty-config"> |
261 <hlm:zipContentMacro type="ee-empty" ec="false" file="${zip.config.file}" failonemptyconfig="false" /> |
261 <hlm:zipContentMacro type="ee-empty" ec="false" file="${zip.config.file}" failonemptyconfig="false" /> |
262 <au:expectfailure> |
262 <au:expectfailure> |
263 <hlm:zipContentMacro type="ee-empty" ec="false" file="${zip.config.file}" failonemptyconfig="true" /> |
263 <hlm:zipContentMacro type="ee-empty" ec="false" file="${zip.config.file}" failonemptyconfig="true" /> |
264 </au:expectfailure> |
264 </au:expectfailure> |
265 </target> |
265 </target> |
266 |
266 |
267 <target name="do-mini-build-archive"> |
267 <target name="do-minibuild-archive"> |
268 <runtarget target="prepare-archiving" /> |
268 <runtarget target="prepare-archiving" /> |
269 <runtarget target="zip-ee" /> |
269 <runtarget target="zip-ee" /> |
270 <!-- Checking the zip generation Ant --> |
270 <!-- Checking the zip generation Ant --> |
271 <au:assertFileExists file="${zips.build.dir}/${zipping.type}/release_metadata.xml" /> |
271 <au:assertFileExists file="${zips.build.dir}/${zipping.type}/release_metadata.xml" /> |
272 <!--au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_app_organizer_clock_binary.zip" /--> |
272 <!--au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_app_organizer_clock_binary.zip" /--> |