587
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_signaling.ant.xml
|
|
5 |
Part of : Helium AntLib
|
|
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 |
-->
|
588
|
23 |
<project name="test-signaling-config" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" xmlns:cond="antlib:org.apache.tools.ant.types.conditions">
|
587
|
24 |
<description>
|
|
25 |
signalInput and notifierList test configuration
|
|
26 |
</description>
|
|
27 |
<dirname property="project.dir.signaling" file="${ant.file.test-signaling-config}" />
|
|
28 |
|
|
29 |
<property name="build.summary.file" location="${project.dir.signaling}/../data/ido_tedo_mcl_devlon52_ec_MCL.52.105_summary.log.xml" />
|
588
|
30 |
|
587
|
31 |
<taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
|
|
32 |
|
|
33 |
<hlm:notifierList id="defaultsignalnotifier">
|
|
34 |
<hlm:executeTaskNotifier>
|
|
35 |
<echo>Signal: ${signal.name}</echo>
|
|
36 |
</hlm:executeTaskNotifier>
|
|
37 |
<hlm:emailNotifier defaultTemplate="${project.dir.signaling}/../data/email_default.html.ftl" title="[signal] ${signal.name}" smtp="${email.smtp.server}" ldap="${email.ldap.server}" from="I_EXT_HELIUM@nokia.com" />
|
|
38 |
</hlm:notifierList>
|
|
39 |
|
|
40 |
<hlm:notifierList id="compilesignalnotifier">
|
|
41 |
<hlm:executeTaskNotifier>
|
|
42 |
<echo>Signal: ${signal.name}</echo>
|
|
43 |
</hlm:executeTaskNotifier>
|
|
44 |
<hlm:emailNotifier defaultTemplate="${project.dir.signaling}/../data/email_default.html.ftl" title="[signal] ${signal.name}" smtp="${email.smtp.server}" ldap="${email.ldap.server}" />
|
|
45 |
</hlm:notifierList>
|
|
46 |
|
|
47 |
|
|
48 |
<hlm:signalInput id="compilesignalinput" failbuild="now">
|
|
49 |
<hlm:notifierListRef refid="compilesignalnotifier" />
|
|
50 |
</hlm:signalInput>
|
|
51 |
|
|
52 |
<property name="number.of.errors" value="4" />
|
|
53 |
|
|
54 |
<hlm:signalInput id="fotasignalinput" failbuild="defer" />
|
|
55 |
|
|
56 |
<hlm:signalInput id="validSignalInput" failbuild="defer">
|
|
57 |
<hlm:notifierListRef refid="defaultsignalnotifier" />
|
|
58 |
</hlm:signalInput>
|
|
59 |
|
|
60 |
<hlm:signalListenerConfig id="compileSignal" target="compile-signal-test" message="Errors happened during compilation">
|
|
61 |
<signalNotifierInput>
|
|
62 |
<signalInput refid="compilesignalinput" />
|
|
63 |
</signalNotifierInput>
|
|
64 |
<targetCondition >
|
588
|
65 |
<cond:not>
|
587
|
66 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
67 |
</cond:not>
|
587
|
68 |
</targetCondition>
|
|
69 |
</hlm:signalListenerConfig>
|
|
70 |
|
|
71 |
<hlm:signalInput id="publishsignalinput" failbuild="never" />
|
|
72 |
|
|
73 |
<hlm:signalInput id="input-fail-build-now" failbuild="now" />
|
|
74 |
|
|
75 |
<hlm:signalInput id="input-fail-build-defer" failbuild="defer" />
|
|
76 |
<hlm:signalInput id="input-fail-build-never" failbuild="never" />
|
|
77 |
|
|
78 |
<hlm:signalListenerConfig id="fotaSignal" target="fota" message="Fota execution finished">
|
|
79 |
<signalNotifierInput>
|
|
80 |
<signalInput refid="fotasignalinput" />
|
|
81 |
</signalNotifierInput>
|
|
82 |
<targetCondition />
|
|
83 |
</hlm:signalListenerConfig>
|
|
84 |
|
|
85 |
<hlm:signalListenerConfig id="publishSignal" target="publish" message="Errors due to publish">
|
|
86 |
<signalNotifierInput>
|
|
87 |
<signalInput refid="publishsignalinput" />
|
|
88 |
</signalNotifierInput>
|
|
89 |
<targetCondition />
|
|
90 |
</hlm:signalListenerConfig>
|
|
91 |
<!--hlm:signallist id="all-signals">
|
|
92 |
<hlm:notifierlistref refid="defaultsignalnotifier" />
|
|
93 |
<hlm:configref refid="compileSignal" />
|
|
94 |
<hlm:configref refid="fotaSignal" />
|
|
95 |
</hlm:signallist-->
|
|
96 |
|
|
97 |
<!--Invalid configurations -->
|
588
|
98 |
<hlm:notifierList id="empty-notifier1" />
|
587
|
99 |
|
588
|
100 |
<hlm:notifierList id="empty-notifier2">
|
587
|
101 |
<!--hlm:notifier type="test" senderlist="${env.username}" /-->
|
|
102 |
</hlm:notifierList>
|
|
103 |
|
588
|
104 |
<hlm:notifierList id="empty-notifier3">
|
587
|
105 |
<!--hlm:notifier type="email" /-->
|
|
106 |
</hlm:notifierList>
|
|
107 |
|
588
|
108 |
<hlm:notifierList id="empty-notifier4">
|
587
|
109 |
<!--hlm:notifier senderlist="${env.username}" /-->
|
|
110 |
</hlm:notifierList>
|
|
111 |
|
|
112 |
|
|
113 |
<hlm:signalInput id="invalid-input2" failbuild="never">
|
|
114 |
<hlm:notifierListRef refid="noreference" />
|
|
115 |
</hlm:signalInput>
|
|
116 |
|
|
117 |
<hlm:signalInput id="invalid-input3" failbuild="never">
|
588
|
118 |
<hlm:notifierListRef refid="empty-notifier1" />
|
587
|
119 |
</hlm:signalInput>
|
|
120 |
|
588
|
121 |
<hlm:signalInput id="valid-input4" failbuild="never">
|
|
122 |
<hlm:notifierListRef refid="empty-notifier2" />
|
587
|
123 |
</hlm:signalInput>
|
|
124 |
|
588
|
125 |
<hlm:signalInput id="valid-input5" failbuild="never">
|
|
126 |
<hlm:notifierListRef refid="empty-notifier3" />
|
587
|
127 |
</hlm:signalInput>
|
|
128 |
|
588
|
129 |
<hlm:signalInput id="valid-input6" failbuild="never">
|
|
130 |
<hlm:notifierListRef refid="empty-notifier4" />
|
587
|
131 |
</hlm:signalInput>
|
|
132 |
|
|
133 |
<hlm:signalListenerConfig id="noreferenceSignal" target="target-invalid-config1" message="Errors happened during compilation">
|
|
134 |
<signalNotifierInput>
|
|
135 |
<hlm:signalInput refid="noreference" />
|
|
136 |
</signalNotifierInput>
|
|
137 |
<targetCondition>
|
588
|
138 |
<cond:not>
|
587
|
139 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
140 |
</cond:not>
|
587
|
141 |
</targetCondition>
|
|
142 |
</hlm:signalListenerConfig>
|
|
143 |
|
|
144 |
<hlm:signalListenerConfig id="noTarget" target="no-target" message="Errors happened during compilation" >
|
|
145 |
<targetCondition />
|
|
146 |
</hlm:signalListenerConfig>
|
|
147 |
|
|
148 |
<hlm:signalListenerConfig id="invalidInputSignal" target="target-invalid-config4" message="Errors happened during compilation">
|
|
149 |
<!-- <hlm:signalInput refid="invalid-input2" /> -->
|
|
150 |
<targetCondition >
|
588
|
151 |
<cond:not>
|
587
|
152 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
153 |
</cond:not>
|
587
|
154 |
</targetCondition>
|
|
155 |
</hlm:signalListenerConfig>
|
|
156 |
|
588
|
157 |
<hlm:signalListenerConfig id="invalidInput3" target="target-empty-notifier-list-config5" message="Errors happened during compilation">
|
587
|
158 |
<signalNotifierInput>
|
588
|
159 |
<signalInput refid="empty-input3" />
|
587
|
160 |
</signalNotifierInput>
|
588
|
161 |
<targetCondition>
|
|
162 |
<cond:not>
|
587
|
163 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
164 |
</cond:not>
|
587
|
165 |
</targetCondition>
|
|
166 |
</hlm:signalListenerConfig>
|
|
167 |
|
588
|
168 |
<hlm:signalListenerConfig id="invalidInput4" target="target-valid-config6" message="Errors happened during compilation">
|
587
|
169 |
<signalNotifierInput>
|
588
|
170 |
<signalInput refid="valid-input4" />
|
587
|
171 |
</signalNotifierInput>
|
|
172 |
<targetCondition >
|
588
|
173 |
<cond:not>
|
587
|
174 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
175 |
</cond:not>
|
587
|
176 |
</targetCondition>
|
|
177 |
</hlm:signalListenerConfig>
|
|
178 |
|
588
|
179 |
<hlm:signalListenerConfig id="validInput5" target="target-valid-config7" message="Errors happened during compilation">
|
587
|
180 |
<signalNotifierInput>
|
588
|
181 |
<signalInput refid="valid-input5" />
|
587
|
182 |
</signalNotifierInput>
|
|
183 |
|
|
184 |
<targetCondition >
|
588
|
185 |
<cond:not>
|
587
|
186 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
187 |
</cond:not>
|
587
|
188 |
</targetCondition>
|
|
189 |
</hlm:signalListenerConfig>
|
|
190 |
|
588
|
191 |
<hlm:signalListenerConfig id="validInput6" target="target-valid-config8" message="Errors happened during compilation">
|
587
|
192 |
<signalNotifierInput>
|
588
|
193 |
<signalInput refid="valid-input6" />
|
587
|
194 |
</signalNotifierInput>
|
|
195 |
<targetCondition >
|
588
|
196 |
<cond:not>
|
587
|
197 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
198 |
</cond:not>
|
587
|
199 |
</targetCondition>
|
|
200 |
</hlm:signalListenerConfig>
|
|
201 |
|
|
202 |
<hlm:signalListenerConfig id="invalidInput7" target="target-invalid-config9" message="Errors happened during compilation">
|
|
203 |
<signalNotifierInput>
|
|
204 |
<signalInput refid="invalid-input7" />
|
|
205 |
</signalNotifierInput>
|
|
206 |
<targetCondition >
|
588
|
207 |
<cond:not>
|
587
|
208 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
209 |
</cond:not>
|
587
|
210 |
</targetCondition>
|
|
211 |
</hlm:signalListenerConfig>
|
|
212 |
|
|
213 |
<hlm:signalListenerConfig id="validInput" target="test-valid-config1">
|
|
214 |
<targetCondition >
|
|
215 |
</targetCondition>
|
|
216 |
</hlm:signalListenerConfig>
|
|
217 |
|
|
218 |
<hlm:signalListenerConfig id="validSignal1" target="target-valid-config2" message="Errors during testing">
|
|
219 |
<signalNotifierInput>
|
|
220 |
<signalInput refid="validSignalInput" />
|
|
221 |
</signalNotifierInput>
|
|
222 |
<targetCondition>
|
|
223 |
<hlm:hasSeverity severity="error" file="${build.summary.file}" />
|
|
224 |
</targetCondition>
|
|
225 |
</hlm:signalListenerConfig>
|
|
226 |
|
|
227 |
<hlm:signalListenerConfig id="validSignal2" target="target-valid-config3" message="Errors during testing">
|
|
228 |
<signalNotifierInput>
|
|
229 |
<signalInput refid="validSignalInput" />
|
|
230 |
</signalNotifierInput>
|
|
231 |
|
645
|
232 |
<targetCondition>
|
|
233 |
<cond:not><equals arg1="0" arg2="0"/></cond:not>
|
587
|
234 |
</targetCondition>
|
|
235 |
</hlm:signalListenerConfig>
|
|
236 |
|
|
237 |
<hlm:signalListenerConfig id="validSignal3" target="target-valid-config4" message="Errors during testing">
|
|
238 |
<signalNotifierInput>
|
|
239 |
<signalInput refid="validSignalInput" />
|
|
240 |
</signalNotifierInput>
|
|
241 |
<targetCondition >
|
645
|
242 |
<cond:not><equals arg1="0" arg2="0"/></cond:not>
|
587
|
243 |
</targetCondition>
|
|
244 |
</hlm:signalListenerConfig>
|
|
245 |
|
|
246 |
<hlm:signalListenerConfig id="validSignal4" target="target-valid-config5" message="Errors during testing">
|
|
247 |
<signalNotifierInput>
|
|
248 |
<signalInput refid="validSignalInput" />
|
|
249 |
</signalNotifierInput>
|
|
250 |
<targetCondition >
|
645
|
251 |
<cond:not><equals arg1="0" arg2="0"/></cond:not>
|
587
|
252 |
</targetCondition>
|
|
253 |
</hlm:signalListenerConfig>
|
|
254 |
|
|
255 |
<hlm:signalListenerConfig id="validSignal5" target="fail-now-false-condition" message="Errors during testing">
|
|
256 |
<signalNotifierInput>
|
|
257 |
<signalInput refid="input-fail-build-now" />
|
|
258 |
</signalNotifierInput>
|
|
259 |
<targetCondition>
|
588
|
260 |
<cond:not>
|
587
|
261 |
<equals arg1="0" arg2="0" />
|
588
|
262 |
</cond:not>
|
587
|
263 |
</targetCondition>
|
|
264 |
</hlm:signalListenerConfig>
|
|
265 |
|
|
266 |
<hlm:signalListenerConfig id="validSignal6" target="fail-now-true-condition" message="Errors during testing">
|
|
267 |
<signalNotifierInput>
|
|
268 |
<signalInput refid="input-fail-build-now" />
|
|
269 |
</signalNotifierInput>
|
|
270 |
<targetCondition >
|
588
|
271 |
<cond:not>
|
587
|
272 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
273 |
</cond:not>
|
587
|
274 |
</targetCondition>
|
|
275 |
</hlm:signalListenerConfig>
|
|
276 |
|
645
|
277 |
<!-- Not allowed hlm:signalListenerConfig id="failNow" target="fail-no-condition" message="Errors during testing" >
|
587
|
278 |
<signalNotifierInput>
|
|
279 |
<signalInput refid="input-fail-build-never" />
|
|
280 |
</signalNotifierInput>
|
|
281 |
<targetCondition />
|
645
|
282 |
</hlm:signalListenerConfig-->
|
587
|
283 |
|
|
284 |
<hlm:signalListenerConfig id="failbuildDefer" target="fail-defer-false-condition" message="Errors during testing">
|
|
285 |
<signalNotifierInput>
|
|
286 |
<signalInput refid="input-fail-build-defer" />
|
|
287 |
</signalNotifierInput>
|
|
288 |
<targetCondition >
|
588
|
289 |
<cond:not>
|
587
|
290 |
<equals arg1="0" arg2="0" />
|
588
|
291 |
</cond:not>
|
587
|
292 |
</targetCondition>
|
|
293 |
</hlm:signalListenerConfig>
|
|
294 |
|
|
295 |
<hlm:signalListenerConfig id="inputFailDefer" target="fail-defer-true-condition" message="Errors during testing">
|
|
296 |
<signalNotifierInput>
|
|
297 |
<signalInput refid="input-fail-build-defer" />
|
|
298 |
</signalNotifierInput>
|
|
299 |
<targetCondition>
|
588
|
300 |
<cond:not>
|
587
|
301 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
302 |
</cond:not>
|
587
|
303 |
</targetCondition>
|
|
304 |
</hlm:signalListenerConfig>
|
|
305 |
|
|
306 |
<hlm:signalListenerConfig id="inputFailNever1" target="fail-defer-never-condition" message="Errors during testing">
|
|
307 |
<signalNotifierInput>
|
|
308 |
<signalInput refid="input-fail-build-never" />
|
|
309 |
</signalNotifierInput>
|
|
310 |
|
|
311 |
<targetCondition>
|
588
|
312 |
<cond:not>
|
587
|
313 |
<equals arg1="0" arg2="0" />
|
588
|
314 |
</cond:not>
|
587
|
315 |
</targetCondition>
|
|
316 |
</hlm:signalListenerConfig>
|
|
317 |
|
|
318 |
<hlm:signalListenerConfig id="failbuildNever2" target="fail-never-true-condition" message="Errors during testing">
|
|
319 |
<signalNotifierInput>
|
|
320 |
<signalInput refid="input-fail-build-never" />
|
|
321 |
</signalNotifierInput>
|
|
322 |
|
645
|
323 |
<targetCondition>
|
588
|
324 |
<cond:not>
|
587
|
325 |
<equals arg1="0" arg2="${number.of.errors}" />
|
588
|
326 |
</cond:not>
|
587
|
327 |
</targetCondition>
|
|
328 |
</hlm:signalListenerConfig>
|
|
329 |
|
|
330 |
<target name="test-wrong-type">
|
|
331 |
<au:expectfailure>
|
|
332 |
<hlm:signalInput id="invalid-input1" failbuild="wrong-type" />
|
|
333 |
</au:expectfailure>
|
|
334 |
</target>
|
645
|
335 |
|
|
336 |
|
|
337 |
<target name="test-dual-cond-failure">
|
|
338 |
<au:expectfailure expectedMessage="TargetCondition type can only accept one condition at">
|
|
339 |
<hlm:signalListenerConfig id="dualCondSignal" target="compile-signal-test" message="Errors happened during compilation">
|
|
340 |
<signalNotifierInput>
|
|
341 |
<signalInput refid="compilesignalinput" />
|
|
342 |
</signalNotifierInput>
|
|
343 |
<targetCondition >
|
|
344 |
<cond:not>
|
|
345 |
<equals arg1="0" arg2="${number.of.errors}" />
|
|
346 |
</cond:not>
|
|
347 |
<cond:equals arg1="0" arg2="${number.of.errors}" />
|
|
348 |
</targetCondition>
|
|
349 |
</hlm:signalListenerConfig>
|
|
350 |
</au:expectfailure>
|
|
351 |
</target>
|
|
352 |
|
|
353 |
<target name="test-dual-signal-input-failure">
|
|
354 |
<au:expectfailure expectedMessage="signalListenerConfig only accept one nested signalNotifierInput at">
|
|
355 |
<hlm:signalListenerConfig id="dualSignalNotifierInputSignal" target="compile-signal-test" message="Errors happened during compilation">
|
|
356 |
<signalNotifierInput>
|
|
357 |
<signalInput refid="compilesignalinput" />
|
|
358 |
</signalNotifierInput>
|
|
359 |
<signalNotifierInput>
|
|
360 |
<signalInput refid="compilesignalinput" />
|
|
361 |
</signalNotifierInput>
|
|
362 |
<targetCondition>
|
|
363 |
<cond:not>
|
|
364 |
<equals arg1="0" arg2="${number.of.errors}" />
|
|
365 |
</cond:not>
|
|
366 |
</targetCondition>
|
|
367 |
</hlm:signalListenerConfig>
|
|
368 |
</au:expectfailure>
|
|
369 |
</target>
|
587
|
370 |
</project>
|