645
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : build.xml
|
|
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="signal-listener-test" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" xmlns:cond="antlib:org.apache.tools.ant.types.conditions">
|
|
24 |
|
|
25 |
<taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
|
|
26 |
|
|
27 |
<!-- Deferred signal -->
|
|
28 |
<hlm:notifierList id="testSignalNotifiers">
|
|
29 |
<hlm:executeTaskNotifier>
|
|
30 |
<echo>Signal: ${signal.name}</echo>
|
|
31 |
</hlm:executeTaskNotifier>
|
|
32 |
</hlm:notifierList>
|
|
33 |
|
|
34 |
<hlm:signalInput id="testDeferredSignalInput" failBuild="defer">
|
|
35 |
<hlm:notifierListRef refid="testSignalNotifiers" />
|
|
36 |
</hlm:signalInput>
|
|
37 |
|
|
38 |
<hlm:signalListenerConfig id="testDeferredSignal" target="failing-target" message="Errors happened during failing-target">
|
|
39 |
<signalNotifierInput>
|
|
40 |
<signalInput refid="testDeferredSignalInput" />
|
|
41 |
</signalNotifierInput>
|
|
42 |
<targetCondition >
|
|
43 |
<cond:not>
|
|
44 |
<equals arg1="0" arg2="${number.of.errors}" />
|
|
45 |
</cond:not>
|
|
46 |
</targetCondition>
|
|
47 |
</hlm:signalListenerConfig>
|
|
48 |
|
|
49 |
<hlm:signalInput id="testNeverSignalInput" failBuild="never">
|
|
50 |
<hlm:notifierListRef refid="testSignalNotifiers" />
|
|
51 |
</hlm:signalInput>
|
|
52 |
|
|
53 |
<hlm:signalListenerConfig id="testNeverSignal" target="never-failing-target" message="Errors happened during never-failing-target">
|
|
54 |
<signalNotifierInput>
|
|
55 |
<signalInput refid="testNeverSignalInput" />
|
|
56 |
</signalNotifierInput>
|
|
57 |
<targetCondition >
|
|
58 |
<cond:not>
|
|
59 |
<equals arg1="0" arg2="${number.of.errors}" />
|
|
60 |
</cond:not>
|
|
61 |
</targetCondition>
|
|
62 |
</hlm:signalListenerConfig>
|
|
63 |
|
|
64 |
<target name="failing-target">
|
|
65 |
<echo message="Executing failing-target." />
|
|
66 |
<property name="number.of.errors" value="1" />
|
|
67 |
</target>
|
|
68 |
|
|
69 |
<target name="build-with-deferred-failure" depends="failing-target">
|
|
70 |
<echo message="Executing build." />
|
|
71 |
</target>
|
|
72 |
|
|
73 |
<target name="never-failing-target">
|
|
74 |
<echo message="Executing never-failing-target." />
|
|
75 |
<property name="number.of.errors" value="1" />
|
|
76 |
</target>
|
|
77 |
|
|
78 |
<target name="build-with-never-failure" depends="never-failing-target">
|
|
79 |
<echo message="Executing build." />
|
|
80 |
</target>
|
|
81 |
|
|
82 |
|
|
83 |
<!-- -->
|
|
84 |
<hlm:signalInput id="testNoCondSignalInput" failBuild="defer" />
|
|
85 |
|
|
86 |
<hlm:signalListenerConfig id="testNoCondSignal" target="no-cond-signal" message="This signal is emitted without specific condition, except the target being called.">
|
|
87 |
<signalNotifierInput>
|
|
88 |
<signalInput refid="testNoCondSignalInput" />
|
|
89 |
</signalNotifierInput>
|
|
90 |
</hlm:signalListenerConfig>
|
|
91 |
|
|
92 |
<target name="no-cond-signal" />
|
|
93 |
|
|
94 |
</project> |