217
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
587
|
4 |
Name : test_scanlog.ant.xml
|
217
|
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="test_scanlog" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>
|
|
25 |
Testing targets
|
|
26 |
</description>
|
|
27 |
<property environment="env"/>
|
|
28 |
|
|
29 |
|
|
30 |
<property name="helium.dir" location="../../.." />
|
588
|
31 |
<import file="../../../build.xml"/>
|
217
|
32 |
<property name="scanlog.temp.dir" location="${helium.build.dir}/antunit/scanlog" />
|
587
|
33 |
|
217
|
34 |
<target name="setUp">
|
|
35 |
<delete dir="${scanlog.temp.dir}" failonerror="false" />
|
|
36 |
<mkdir dir="${scanlog.temp.dir}" />
|
|
37 |
</target>
|
|
38 |
|
|
39 |
<target name="tearDown">
|
587
|
40 |
<!-- delete dir="${scanlog.temp.dir}" failonerror="false" / -->
|
217
|
41 |
</target>
|
|
42 |
|
|
43 |
<target name="test-scanlog-generation">
|
587
|
44 |
<property name="sbs.log.file" location="${helium.dir}/tests/data/test-scanlog_helium_minibuild_ido_input_compile.log" />
|
|
45 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test-scanlog-generation_db">
|
|
46 |
<hlm:sbsmetadatainput>
|
|
47 |
<fileset casesensitive="false" file="${sbs.log.file}"/>
|
|
48 |
<metadatafilterset refid="filterset.sbs" />
|
|
49 |
</hlm:sbsmetadatainput>
|
|
50 |
</hlm:metadatarecord>
|
|
51 |
|
217
|
52 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/scan2_orm.html.ftl"
|
|
53 |
outputfile="${scanlog.temp.dir}/scanlog.scan2.html">
|
|
54 |
<freemarkerLinks expandProperties="yes">
|
|
55 |
macro: ${helium.dir}/tools/common/templates/macro
|
|
56 |
</freemarkerLinks>
|
|
57 |
<data expandProperties="yes">
|
587
|
58 |
dbPath: ${scanlog.temp.dir}/test-scanlog-generation_db
|
|
59 |
logfilename: antProperty('sbs.log.file')
|
|
60 |
ant: antProperties()
|
|
61 |
</data>
|
|
62 |
</fmpp>
|
|
63 |
<au:assertFileExists file="${scanlog.temp.dir}/scanlog.scan2.html" />
|
|
64 |
<loadfile property="scanlog" srcFile="${scanlog.temp.dir}/scanlog.scan2.html" />
|
|
65 |
<au:assertTrue message="Time must be 00:00:13">
|
|
66 |
<contains string="${scanlog}" substring="00:00:13" />
|
|
67 |
</au:assertTrue>
|
|
68 |
<au:assertTrue message="Check for components">
|
|
69 |
<and>
|
|
70 |
<contains string="${scanlog}" substring="sf/mw/HelloWorldAPI/group" />
|
|
71 |
<contains string="${scanlog}" substring="sf/app/HelloWorldCons/group" />
|
|
72 |
</and>
|
|
73 |
</au:assertTrue>
|
|
74 |
</target>
|
|
75 |
|
|
76 |
<target name="test-cc-summary-generation">
|
|
77 |
<condition property="sbs.log.file" value="${helium.dir}/tests/data/test-scanlog_linux_helium_minibuild_ido_input_compile.log">
|
|
78 |
<os family="unix" />
|
|
79 |
</condition>
|
|
80 |
<property name="sbs.log.file" location="${helium.dir}/tests/data/test-scanlog_helium_minibuild_ido_input_compile.log" />
|
|
81 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test-cc-summary-generation_db">
|
|
82 |
<hlm:sbsmetadatainput>
|
|
83 |
<fileset casesensitive="false" file="${sbs.log.file}"/>
|
|
84 |
<metadatafilterset refid="filterset.sbs" />
|
|
85 |
</hlm:sbsmetadatainput>
|
|
86 |
</hlm:metadatarecord>
|
|
87 |
|
|
88 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/cc_summary_metadata_orm.html.ftl"
|
|
89 |
outputfile="${scanlog.temp.dir}/cc_summary.html">
|
|
90 |
<freemarkerLinks expandProperties="yes">
|
|
91 |
macro: ${helium.dir}/tools/common/templates/macro
|
|
92 |
</freemarkerLinks>
|
|
93 |
<data expandProperties="yes">
|
|
94 |
dbPath: ${scanlog.temp.dir}/test-cc-summary-generation_db
|
|
95 |
logfilename: antProperty('sbs.log.file')
|
|
96 |
ant: antProperties()
|
|
97 |
</data>
|
|
98 |
</fmpp>
|
|
99 |
<au:assertFileExists file="${scanlog.temp.dir}/cc_summary.html" />
|
|
100 |
<loadfile property="scanlog" srcFile="${scanlog.temp.dir}/cc_summary.html" />
|
|
101 |
<au:assertTrue message="Check for components">
|
|
102 |
<and>
|
|
103 |
<contains string="${scanlog}" substring="sf/mw/HelloWorldAPI/group" />
|
|
104 |
<contains string="${scanlog}" substring="sf/app/HelloWorldCons/group" />
|
|
105 |
</and>
|
|
106 |
</au:assertTrue>
|
588
|
107 |
<au:assertTrue message="Check for 7 errors">
|
|
108 |
<contains string="${scanlog}" substring=">7</td>" />
|
587
|
109 |
</au:assertTrue>
|
588
|
110 |
<au:assertTrue message="Check for 16 errors">
|
|
111 |
<contains string="${scanlog}" substring=">16</td>" />
|
|
112 |
</au:assertTrue>
|
587
|
113 |
</target>
|
|
114 |
|
|
115 |
|
|
116 |
<target name="scanlog-metadata-text">
|
|
117 |
<echo message="log.dir:${env.TEMP}/" />
|
|
118 |
|
|
119 |
<hlm:scanlogMetadataTest log="${helium.dir}/tests/data/scanlog/all_regex_type.log"
|
|
120 |
output="${helium.dir}/tests/data/test-scanlog-metadata-text.log" />
|
|
121 |
<hlm:assertFileExists file="${helium.dir}/tests/data/test-scanlog-metadata-text"/>
|
|
122 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test-metadata-1_db">
|
|
123 |
<hlm:textmetadatainput>
|
|
124 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/test-scanlog-metadata-1.log"/>
|
|
125 |
<metadatafilterset refid="filterset.sbs" />
|
|
126 |
</hlm:textmetadatainput>
|
|
127 |
</hlm:metadatarecord>
|
|
128 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/scan2_text_orm.html.ftl"
|
|
129 |
outputfile="${scanlog.temp.dir}/test-scanlog-metadata-1.log.scan2.html">
|
|
130 |
<freemarkerLinks expandProperties="yes">
|
|
131 |
macro: ${helium.dir}/tools/common/templates/macro
|
|
132 |
</freemarkerLinks>
|
|
133 |
<data expandProperties="yes">
|
|
134 |
dbPath: ${scanlog.temp.dir}/test-metadata-1_db
|
|
135 |
ant: antProperties()
|
|
136 |
</data>
|
|
137 |
</fmpp>
|
|
138 |
<hlm:generateBuildStatus dbfile="${scanlog.temp.dir}/test-metadata-1_db" output-dir="${helium.dir}/tests/data/" file="test-scanlog-metadata-1.log"/>
|
|
139 |
<hlm:assertFileExists file="${scanlog.temp.dir}/test-scanlog-metadata-1.log.scan2.html"/>
|
|
140 |
</target>
|
|
141 |
|
|
142 |
|
|
143 |
|
|
144 |
<hlm:signalInput id="testSBSScanlogInput" failbuild="now">
|
|
145 |
<hlm:notifierListRef refid="defaultFailNotifier" />
|
|
146 |
</hlm:signalInput>
|
|
147 |
|
|
148 |
<hlm:signalListenerConfig id="testSBSScanlog" target="test-scanlog-metadata-1" message="sbs scanlog processed">
|
|
149 |
<hlm:targetCondition>
|
|
150 |
<hlm:hasSeverity severity="error" file="${env.TEMP}/signals/test-scanlog-metadata-1.log.status.xml" />
|
|
151 |
</hlm:targetCondition>
|
|
152 |
<signalNotifierInput>
|
|
153 |
<signalInput refid="testSBSScanlogInput" />
|
|
154 |
<notifierInput file = "${env.TEMP}/signals/test-scanlog-metadata-1.log.status.html" />
|
|
155 |
</signalNotifierInput>
|
|
156 |
</hlm:signalListenerConfig>
|
|
157 |
|
|
158 |
<target name="scanlog-metadata-1">
|
|
159 |
<echo message="log.dir:${env.TEMP}/" />
|
|
160 |
<property name="sbslog" location="${helium.dir}/tests/data/scanlog/all_regex_type.log" />
|
|
161 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test-metadata-1_db">
|
|
162 |
<hlm:sbsmetadatainput>
|
|
163 |
<fileset casesensitive="false" file="${sbslog}"/>
|
|
164 |
<metadatafilterset refid="filterset.sbs" />
|
|
165 |
</hlm:sbsmetadatainput>
|
|
166 |
</hlm:metadatarecord>
|
|
167 |
<hlm:assertFileExists file="${sbslog}"/>
|
|
168 |
<hlm:assertFileExists file="${sbslog}.sbs_error.log"/>
|
|
169 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/scan2_orm.html.ftl"
|
|
170 |
outputfile="${scanlog.temp.dir}/test-scanlog-metadata-1.log.scan2.html">
|
|
171 |
<freemarkerLinks expandProperties="yes">
|
|
172 |
macro: ${helium.dir}/tools/common/templates/macro
|
|
173 |
</freemarkerLinks>
|
|
174 |
<data expandProperties="yes">
|
|
175 |
dbPath: ${scanlog.temp.dir}/test-metadata-1_db
|
217
|
176 |
ant: antProperties()
|
|
177 |
</data>
|
|
178 |
</fmpp>
|
587
|
179 |
<basename property="sbslog.basename" file="${sbslog}" />
|
|
180 |
<hlm:generateBuildStatus dbfile="${scanlog.temp.dir}/test-metadata-1_db"
|
|
181 |
output-dir="${scanlog.temp.dir}" file="${sbslog.basename}"/>
|
|
182 |
<au:assertFileExists file="${scanlog.temp.dir}/test-scanlog-metadata-1.log.scan2.html"/>
|
217
|
183 |
</target>
|
587
|
184 |
|
217
|
185 |
|
587
|
186 |
<target name="test-metadata-signal">
|
|
187 |
<antcall target="scanlog-metadata-1" />
|
|
188 |
</target>
|
|
189 |
|
|
190 |
<target name="test-diamonds-faults">
|
|
191 |
<condition property="sbs.log.file" value="${helium.dir}/tests/data/test-scanlog_linux_helium_minibuild_ido_input_compile.log">
|
|
192 |
<os family="unix" />
|
|
193 |
</condition>
|
|
194 |
<property name="sbs.log.file" location="${helium.dir}/tests/data/test-scanlog_helium_minibuild_ido_input_compile.log" />
|
588
|
195 |
<copy file="${sbs.log.file}" tofile="${scanlog.temp.dir}/test-scanlog_helium_minibuild_ido_input_clean_compile.log" />
|
|
196 |
<copy file="${sbs.log.file}" tofile="${scanlog.temp.dir}/test-scanlog_helium_minibuild_ido_input2_compile.log" />
|
587
|
197 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test-diamonds-faults_db">
|
|
198 |
<hlm:sbsmetadatainput>
|
|
199 |
<fileset casesensitive="false" file="${sbs.log.file}"/>
|
588
|
200 |
<fileset casesensitive="false" file="${scanlog.temp.dir}/test-scanlog_helium_minibuild_ido_input_clean_compile.log" />
|
|
201 |
<fileset casesensitive="false" file="${scanlog.temp.dir}/test-scanlog_helium_minibuild_ido_input2_compile.log" />
|
|
202 |
<metadatafilterset refid="filterset.sbs" />
|
|
203 |
</hlm:sbsmetadatainput>
|
|
204 |
<hlm:sbsmetadatainput>
|
|
205 |
<fileset casesensitive="false" file="${scanlog.temp.dir}/test-scanlog_helium_minibuild_ido_input_clean_compile.log" />
|
587
|
206 |
<metadatafilterset refid="filterset.sbs" />
|
|
207 |
</hlm:sbsmetadatainput>
|
588
|
208 |
<hlm:sbsmetadatainput>
|
|
209 |
<fileset casesensitive="false" file="${scanlog.temp.dir}/test-scanlog_helium_minibuild_ido_input2_compile.log" />
|
|
210 |
<metadatafilterset refid="filterset.sbs" />
|
|
211 |
</hlm:sbsmetadatainput>
|
|
212 |
<hlm:textmetadatainput>
|
|
213 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/diamonds-faults_compile.text.log"/>
|
|
214 |
<metadatafilterset refid="filterset.sbs" />
|
|
215 |
</hlm:textmetadatainput>
|
587
|
216 |
</hlm:metadatarecord>
|
|
217 |
|
|
218 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/faults_metadata_orm.ftl"
|
|
219 |
outputfile="${scanlog.temp.dir}/compile-main.xml">
|
|
220 |
<data expandProperties="yes">
|
|
221 |
dbPath: ${scanlog.temp.dir}/test-diamonds-faults_db
|
|
222 |
ant: antProperties()
|
|
223 |
</data>
|
|
224 |
</fmpp>
|
|
225 |
<loadfile property="scanlog" srcFile="${scanlog.temp.dir}/compile-main.xml" />
|
588
|
226 |
<echo>${scanlog}</echo>
|
587
|
227 |
<au:assertTrue message="Check for components">
|
|
228 |
<and>
|
|
229 |
<contains string="${scanlog}" substring="<name>sf/mw/HelloWorldAPI/group</name>" />
|
|
230 |
<contains string="${scanlog}" substring="<name>sf/app/HelloWorldCons/group</name>" />
|
588
|
231 |
<contains string="${scanlog}" substring="<generated_files>46</generated_files>" />
|
587
|
232 |
</and>
|
|
233 |
</au:assertTrue>
|
588
|
234 |
|
|
235 |
<au:assertTrue message="Check that diamonds-faults_compile.text.log is not pushed to diamonds">
|
|
236 |
<not>
|
|
237 |
<contains string="${scanlog}" substring="<name>diamonds-faults_compile.text.log</name>" />
|
|
238 |
</not>
|
587
|
239 |
</au:assertTrue>
|
588
|
240 |
<au:assertTrue message="Check for 46 errors">
|
|
241 |
<contains string="${scanlog}" substring=">46</total>" />
|
587
|
242 |
</au:assertTrue>
|
588
|
243 |
<au:assertTrue message="Check for 32 errors">
|
|
244 |
<contains string="${scanlog}" substring=">32</total>" />
|
|
245 |
</au:assertTrue>
|
|
246 |
<au:assertTrue message="Check for 14 errors">
|
|
247 |
<contains string="${scanlog}" substring=">14</total>" />
|
587
|
248 |
</au:assertTrue>
|
|
249 |
</target>
|
|
250 |
|
|
251 |
<target name="test-cc-summary-metadata-generation">
|
|
252 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test_metadata_db">
|
|
253 |
<hlm:antmetadatainput>
|
|
254 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/test_minibuild_ido_ccm_get_input.log"/>
|
|
255 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/test_minibuild_compile_roms.log"/>
|
|
256 |
<metadatafilterset refid="filterset.common" />
|
|
257 |
</hlm:antmetadatainput>
|
|
258 |
<hlm:sbsmetadatainput>
|
|
259 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/test-scanlog_cc_summary_compile.log"/>
|
|
260 |
<metadatafilterset refid="filterset.sbs" />
|
|
261 |
</hlm:sbsmetadatainput>
|
|
262 |
<hlm:policymetadatainput>
|
|
263 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/test_minibuild_compile_validate-policy.summary.xml"/>
|
|
264 |
<metadatafilterset refid="filterset.common" />
|
|
265 |
</hlm:policymetadatainput>
|
|
266 |
</hlm:metadatarecord>
|
|
267 |
|
|
268 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/cc_summary_metadata_orm.html.ftl"
|
|
269 |
outputfile="${scanlog.temp.dir}/cc_summary.html">
|
|
270 |
<data expandProperties="yes">
|
|
271 |
dbPath: ${scanlog.temp.dir}/test_metadata_db
|
|
272 |
ant: antProperties()
|
|
273 |
</data>
|
|
274 |
</fmpp>
|
|
275 |
|
|
276 |
<au:assertFileExists file="${scanlog.temp.dir}/cc_summary.html" />
|
|
277 |
<loadfile property="cclog" srcFile="${scanlog.temp.dir}/cc_summary.html" />
|
|
278 |
<au:assertTrue message="Check for synergy errors">
|
|
279 |
<contains string="${cclog}" substring="Exception: Could not find object TestDomain-50_200832:project:testDb#1 in the database" />
|
|
280 |
</au:assertTrue>
|
|
281 |
<au:assertTrue message="Check for build errors">
|
|
282 |
<contains string="${cclog}" substring="test-scanlog_cc_summary_compile.log" />
|
|
283 |
</au:assertTrue>
|
588
|
284 |
<au:assertTrue message="Check for 8 build errors">
|
|
285 |
<contains string="${cclog}" substring="8" />
|
587
|
286 |
</au:assertTrue>
|
588
|
287 |
<au:assertTrue message="Check for 16 build errors">
|
|
288 |
<contains string="${cclog}" substring="16" />
|
587
|
289 |
</au:assertTrue>
|
|
290 |
<au:assertTrue message="Check for validate policy errors">
|
|
291 |
<and>
|
|
292 |
<contains string="${cclog}" substring="s60\test\tools\uitools\DOM" />
|
|
293 |
<contains string="${cclog}" substring="s60\test\tools\uitools\DOM\SAX2DOM" />
|
|
294 |
</and>
|
|
295 |
</au:assertTrue>
|
|
296 |
<au:assertTrue message="Check for Roms">
|
|
297 |
<contains string="${cclog}" substring="WARNING: Nothing to build" />
|
|
298 |
</au:assertTrue>
|
|
299 |
</target>
|
|
300 |
|
|
301 |
<target name="test-missing-files-clean-compile">
|
|
302 |
<property name="sbs.log.file" value="${helium.dir}/tests/data/test_helium_minibuild_ido_input_clean_armv5_compile.log"/>
|
|
303 |
<hlm:metadatarecord database="${scanlog.temp.dir}/test_compile_clean_metadata_db">
|
|
304 |
<hlm:sbsmetadatainput>
|
|
305 |
<fileset casesensitive="false" file="${sbs.log.file}"/>
|
|
306 |
<metadatafilterset refid="filterset.sbs" />
|
|
307 |
</hlm:sbsmetadatainput>
|
|
308 |
</hlm:metadatarecord>
|
|
309 |
|
|
310 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/log/scan2_orm.html.ftl"
|
|
311 |
outputfile="${scanlog.temp.dir}/test_scan2.html">
|
|
312 |
<freemarkerLinks expandProperties="yes">
|
|
313 |
macro: ${helium.dir}/tools/common/templates/macro
|
|
314 |
</freemarkerLinks>
|
|
315 |
<data expandProperties="yes">
|
|
316 |
dbPath: ${scanlog.temp.dir}/test_compile_clean_metadata_db
|
|
317 |
logfilename: ${sbs.log.file}
|
|
318 |
ant: antProperties()
|
|
319 |
</data>
|
|
320 |
</fmpp>
|
|
321 |
|
|
322 |
<au:assertFileExists file="${scanlog.temp.dir}/test_scan2.html" />
|
|
323 |
<loadfile property="scanog" srcFile="${scanlog.temp.dir}/test_scan2.html" />
|
|
324 |
<au:assertFalse message="Check for Missing Files">
|
|
325 |
<contains string="${scanog}" substring="MISSING: " />
|
|
326 |
</au:assertFalse>
|
|
327 |
</target>
|
|
328 |
|
|
329 |
|
217
|
330 |
</project>
|
|
331 |
|