|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="minibuild.qt" default="mini-build" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" basedir="."> |
|
24 <property environment="env" /> |
|
25 <import file="../site/${env.TEAM}.ant.xml" optional="true"/> |
|
26 <dirname property="config.dir" file="${ant.file.minibuild.qt}" /> |
|
27 |
|
28 <!-- Enable Helium internal assertion checking. --> |
|
29 <property name="hlm.enable.asserts" value="1" /> |
|
30 |
|
31 <!-- Configure Qt building --> |
|
32 <property name="compile.sysdef.dtd.stub" location="${helium.dir}/tools/common/dtd/sysdef_dtd_1_5_1.xml" /> |
|
33 <property name="qmake.enabled" value="true" /> |
|
34 <property name="qt.dir" location="${build.drive}/sf/mw/qt" /> |
|
35 |
|
36 <property name="build.name" value="minibuild_qt" /> |
|
37 <property name="build.family" value="test_minibuilds" /> |
|
38 <property name="major.version" value="0" /> |
|
39 <property name="minor.version" value="0" /> |
|
40 <property name="publish.root.dir" location="${build.drive}/release" /> |
|
41 |
|
42 <!-- For Grace upload--> |
|
43 <property name="release.grace.service" value="Test_Helium" /> |
|
44 <property name="release.grace.product" value="minibuild_qt" /> |
|
45 <property name="release.label" value="${major.version}.${minor.version}" /> |
|
46 |
|
47 <!-- build configuration --> |
|
48 <property name="sysdef.configurations.list" value="build_tools,build" /> |
|
49 <path id="system.definition.files"> |
|
50 <fileset dir="." includes="*.sysdef.xml" /> |
|
51 </path> |
|
52 |
|
53 <property name="build.system" value="ec-helium" /> |
|
54 |
|
55 <!-- Synergy is not configured --> |
|
56 <property name="skip.password.validation" value="1" /> |
|
57 <property name="zip.config.file" value="${helium.dir}/tests/minibuilds/qt/config/qmake_zip_cfg.xml"/> |
|
58 <property name="zips.ee.spec.name" value="ee"/> |
|
59 |
|
60 |
|
61 <import file="${helium.dir}/helium.ant.xml" /> |
|
62 |
|
63 <!-- Run the full sequence of target for the minibuild. ,mini-build-prep,compile-main,zip-ee,mini-build-check--> |
|
64 <target name="do-mini-build" depends="mini-build-cleanup,mini-build-prep,export-tools, |
|
65 compile-main,zip-ee, mini-build-check" /> |
|
66 |
|
67 |
|
68 |
|
69 <!--ant code coverage for mini-builds--> |
|
70 <target name="mini-build"> |
|
71 <antcall target="database"> |
|
72 <param name="home.files.only" value="false"/> |
|
73 </antcall> |
|
74 <mkdir dir="${helium.build.dir}/temp" /> |
|
75 <hlm:coveragerecord name="${helium.build.dir}/temp/test_minibuild.xml" action="start" /> |
|
76 <runtarget target="do-mini-build" /> |
|
77 <hlm:coveragerecord name="${helium.build.dir}/temp/test_minibuild.xml" action="stop" /> |
|
78 <fmpp sourcefile="${helium.dir}/tools/common/templates/coveragerecord.txt.ftl" outputfile="${helium.build.dir}/temp/test_minibuild.txt"> |
|
79 <data expandProperties="yes"> |
|
80 doc: xml(${helium.build.dir}/temp/test_minibuild.xml) |
|
81 database: xml(${database.file}) |
|
82 </data> |
|
83 </fmpp> |
|
84 <loadfile srcfile="${helium.build.dir}/temp/test_minibuild.txt" property="ant.coverage.summary" /> |
|
85 <echo> |
|
86 The summary of Ant code coverage: |
|
87 |
|
88 ${ant.coverage.summary}</echo> |
|
89 <fmpp sourcefile="${helium.dir}/tools/common/templates/coveragerecord.html.ftl" outputfile="${helium.build.dir}/temp/test_minibuild.html"> |
|
90 <data expandProperties="yes"> |
|
91 doc: xml(${helium.build.dir}/temp/test_minibuild.xml) |
|
92 database: xml(${database.file}) |
|
93 </data> |
|
94 </fmpp> |
|
95 </target> |
|
96 |
|
97 <!-- Prepare the minibuild. --> |
|
98 <target name="mini-build-prep" depends="prep" /> |
|
99 |
|
100 <!-- Stubbing few targets for easy testing with dragonfly ... --> |
|
101 <target name="prep-drive" depends="build-number" /> |
|
102 <target name="dragonfly-prep-drive" /> |
|
103 <target name="do-prep-work-area" /> |
|
104 <target name="create-bom" /> |
|
105 <target name="check-env-prep" /> |
|
106 <target name="prep-copy"> |
|
107 <property name="qt.zip" value="qt-embedded-s60-commercial-src-4.5.0-garden.zip" /> |
|
108 <!-- Qt prerelease are accessible from the outside world too. --> |
|
109 <if> |
|
110 <not><available file="${build.drive}/${qt.zip}"/></not> |
|
111 <then> |
|
112 <get src="http://pepper.troll.no/s60prereleases/testpackages/garden05/${qt.zip}" dest="${build.drive}/${qt.zip}"/> |
|
113 </then> |
|
114 </if> |
|
115 <mkdir dir="${qt.dir}"/> |
|
116 <delete> |
|
117 <fileset dir="${qt.dir}"> |
|
118 <include name="**/bld.inf"/> |
|
119 <include name="**/*.mmp"/> |
|
120 </fileset> |
|
121 </delete> |
|
122 <unzip src="${build.drive}/${qt.zip}" dest="${qt.dir}/../"> |
|
123 <mapper> |
|
124 <regexpmapper from="^qt([^/]*)/(.*)$$" to="qt/\2"/> |
|
125 </mapper> |
|
126 </unzip> |
|
127 </target> |
|
128 |
|
129 |
|
130 |
|
131 <!-- Check that the XML data returned from Diamonds via the REST interface |
|
132 is the same as what is sent. |
|
133 |
|
134 Currently there are some differences between the formats so some edits to the |
|
135 XML content are made before using XMLUnit to compare the content. |
|
136 --> |
|
137 <target name="check-diamonds"> |
|
138 <loadfile srcfile="${build.log.dir}/${build.id}_diamonds-log-start.xml" property="diamonds.log.start"> |
|
139 <filterchain> |
|
140 <tokenfilter> |
|
141 <filetokenizer /> |
|
142 <hlm:prettyprintxml /> |
|
143 </tokenfilter> |
|
144 </filterchain> |
|
145 </loadfile> |
|
146 <echo>Data sent to Diamonds: |
|
147 |
|
148 ${diamonds.log.start}</echo> |
|
149 <loadresource property="diamonds.log.start.output"> |
|
150 <url url="${diamonds.build.url}?fmt=xml" /> |
|
151 <filterchain> |
|
152 <tokenfilter> |
|
153 <filetokenizer /> |
|
154 <hlm:prettyprintxml /> |
|
155 </tokenfilter> |
|
156 </filterchain> |
|
157 </loadresource> |
|
158 <echo>Data returned from Diamonds: |
|
159 |
|
160 ${diamonds.log.start.output}</echo> |
|
161 <echo file="${helium.dir}/diamonds_build.xml">${diamonds.log.start}</echo> |
|
162 <!--xmltask source="${helium.dir}/diamonds_build.xml" dest="${helium.dir}/diamonds_build_edit.xml"> |
|
163 |
|
164 <cut path="/diamonds-build/tool" buffer="toolElements"/> |
|
165 <cut path="/diamonds-build/locations" buffer="temp"/> |
|
166 </xmltask--> |
|
167 <!--<loadfile srcfile="${helium.dir}/diamonds_build_edit.xml" property="diamonds.log.start.edited"/> |
|
168 <echo>Data sent massaged to match what is received: |
|
169 |
|
170 ${diamonds.log.start.edited}</echo>--> |
|
171 <!-- TODO: make assertXmlEqual work with direct string input --> |
|
172 <string id="control.id" value="${diamonds.log.start}" /> |
|
173 <string id="test.id" value="${diamonds.log.start.output}" /> |
|
174 <hlm:assertXmlEqual control="control.id" test="test.id" failonerror="true" /> |
|
175 </target> |
|
176 |
|
177 <!-- Export tools under epoc32/tools --> |
|
178 <target name="cmaker-qt" depends="cmaker-export,cmaker-what" /> |
|
179 <target name="export-tools"> |
|
180 <antcall target="cmaker-qt"> |
|
181 <param name="cmaker.config.dir" location="${qt.dir}/group/cmaker"/> |
|
182 </antcall> |
|
183 </target> |
|
184 |
|
185 <target name="mini-build-cleanup"> |
|
186 <delete verbose="true" includeemptydirs="true"> |
|
187 <fileset dir="${build.drive}/" casesensitive="false"> |
|
188 <include name="makefile" /> |
|
189 <include name="*.mk" /> |
|
190 <include name="*.make" /> |
|
191 <include name="ecloud_tmp_*/**" /> |
|
192 <include name="emake.*" /> |
|
193 <include name="epoc32/build/**" /> |
|
194 <include name="epoc32/rombuild/imaker_temp/**" /> |
|
195 <include name="epoc32/rombuild/${product.name}/**" /> |
|
196 <include name="epoc32/rom/config/*/**/foti*.*" /> |
|
197 <include name="output/**" /> |
|
198 <include name="timestart.txt" /> |
|
199 <include name="timestop.txt" /> |
|
200 <include name="epoc32/tools/qmake.exe" /> |
|
201 <include name="epoc32/tools/rcc.exe" /> |
|
202 <include name="epoc32/tools/uic.exe" /> |
|
203 <include name="epoc32/tools/moc.exe" /> |
|
204 <include name="sf/mw/qt/src/**/bld.inf" /> |
|
205 <include name="sf/mw/qt/src/**/*.mmp" /> |
|
206 <exclude name="output/build_area/localised/**" /> |
|
207 </fileset> |
|
208 </delete> |
|
209 </target> |
|
210 |
|
211 <target name="mini-build-check"> |
|
212 <!-- Checking that the qmake command line have been generated correctly --> |
|
213 <if> |
|
214 <or> |
|
215 <equals arg1="${build.system}" arg2="ec-helium" /> |
|
216 <equals arg1="${build.system}" arg2="sbs-ec" /> |
|
217 </or> |
|
218 <then> |
|
219 <au:assertFileExists file="${temp.build.dir}/run-qmake-build.mk" /> |
|
220 <loadfile property="qmake.build.makefile" srcFile="${temp.build.dir}/run-qmake-build.mk"/> |
|
221 <au:assertTrue> |
|
222 <and> |
|
223 <contains string="${qmake.build.makefile}" substring="qmake -listgen -r src.pro" /> |
|
224 <contains string="${qmake.build.makefile}" substring="qmake -listgen -platform symbian-abld -r examples.pro" /> |
|
225 </and> |
|
226 </au:assertTrue> |
|
227 </then> |
|
228 <else> |
|
229 <xpathtest xmlfile="${temp.build.dir}/run-qmake-build.ant.xml"> |
|
230 <namespace uri="" prefix=""/> |
|
231 <xpath expression="/project/target[@name='all']/parallel/sequential/if/then/exec/arg[@value='-listgen']"/> |
|
232 <xpath expression="/project/target[@name='all']/parallel/sequential/if/then/exec/arg[@line='-r']"/> |
|
233 <xpath expression="/project/target[@name='all']/parallel/sequential/if/then/exec/arg[@line='-platform symbian-abld -r -listgen']"/> |
|
234 </xpathtest> |
|
235 </else> |
|
236 </if> |
|
237 |
|
238 <!-- Check if prep has set some prop correctly... --> |
|
239 <echo>'${arm.compiler.version}'</echo> |
|
240 <au:assertMatches string="${arm.compiler.version}" pattern="RVCT2\.2 \[Build 616\]" casesensitive="false" multiline="true" /> |
|
241 |
|
242 <!-- Check if compile-main step did what expected... --> |
|
243 <au:assertFileExists file="${canonical.sysdef.file}" /> |
|
244 <au:assertFileExists file="${qt.dir}/src/bld.inf" /> |
|
245 <au:assertFileExists file="${qt.dir}/examples/bld.inf" /> |
|
246 <au:assertFileExists file="${build.drive}/epoc32/tools/qmake.bat" /> |
|
247 <au:assertFileExists file="${build.drive}/epoc32/tools/moc.bat" /> |
|
248 <hlm:assertFileExists file="${build.log.dir}/${build.id}_build.qmake.generated.txt"/> |
|
249 <hlm:assertFileExists file="${build.log.dir}/${build.id}_build_tools.qmake.generated.txt"/> |
|
250 <loadfile srcFile="${build.log.dir}/${build.id}_build.qmake.generated.txt" property="qmake.generated.output"/> |
|
251 <au:assertMatches string="${qmake.generated.output}" pattern="[^/]+/+[^/]+" /> |
|
252 |
|
253 </target> |
|
254 |
|
255 <!-- Never fail the build. --> |
|
256 <hlm:signalInput id="compileSignalInput" failbuild="never"> |
|
257 <hlm:notifierListRef refid="defaultSignalFailNotifier" /> |
|
258 </hlm:signalInput> |
|
259 |
|
260 </project> |
|
261 |