|
1 <?xml version="1.0"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : test_executor.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 --> |
|
23 <project name="test-executor" xmlns:au="antlib:org.apache.ant.antunit"> |
|
24 <description>Helium antlib core executor tests.</description> |
|
25 |
|
26 <target name="final-target-1"> |
|
27 <echo message="about to call final target" /> |
|
28 <fail message="test is failed for final target" /> |
|
29 </target> |
|
30 |
|
31 <target name="test-final-target-1"> |
|
32 <property name="hlm.target.final" value="test_final_target" /> |
|
33 <au:expectfailure> |
|
34 <antcall target="final-target-1" /> |
|
35 </au:expectfailure> |
|
36 </target> |
|
37 |
|
38 <target name="test-final-target-2"> |
|
39 <property name="hlm.target.final" value="test_final_target" /> |
|
40 <echo message="about to call final target" /> |
|
41 </target> |
|
42 |
|
43 <target name="test-final-target-3" depends="test_final_target"> |
|
44 <!-- assumption is that always that the target would be running --> |
|
45 <property name="hlm.target.final" value="test_final_target" /> |
|
46 </target> |
|
47 |
|
48 <target name="test-final-target-4"> |
|
49 <!-- assumption is that always that the target would be running --> |
|
50 <property name="hlm.target.final" value="non-exist-target" /> |
|
51 </target> |
|
52 |
|
53 |
|
54 <target name="test_final_target"> |
|
55 <echo message="executing test_final_target by default at end" /> |
|
56 </target> |
|
57 |
|
58 <target name="test-executor"> |
|
59 <au:logcapturer/> |
|
60 <exec osfamily="windows" executable="cmd"> |
|
61 <arg line="/C ant"/> |
|
62 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor"/> |
|
63 <arg line="-lib ../../../../bin"/> |
|
64 <arg line="-lib ../../../../lib"/> |
|
65 <arg line="-lib ../../../../antlibs"/> |
|
66 <arg line="target"/> |
|
67 </exec> |
|
68 <exec osfamily="unix" executable="ant"> |
|
69 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor"/> |
|
70 <arg line="-lib ../../../../bin"/> |
|
71 <arg line="-lib ../../../../lib"/> |
|
72 <arg line="-lib ../../../../antlibs"/> |
|
73 <arg line="target"/> |
|
74 </exec> |
|
75 <exec osfamily="unix" executable="ant"> |
|
76 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor"/> |
|
77 <arg line="-lib ../../../../bin"/> |
|
78 <arg line="-lib ../../../../lib"/> |
|
79 <arg line="-lib ../../../../antlibs"/> |
|
80 <arg line="target"/> |
|
81 </exec> |
|
82 </target> |
|
83 </project> |