179
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_emakeengine.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="helium-antlib-imaker-emakeengine-unittest" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>Helium Antlib imaker unittests.</description>
|
|
25 |
|
|
26 |
<taskdef resource="com/nokia/helium/imaker/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
|
|
27 |
<property name="epocroot" location="${basedir}/../epocroot_task" />
|
|
28 |
<property name="epocroot.temp" location="${epocroot}/temp" />
|
|
29 |
|
|
30 |
<!-- is called prior to the test -->
|
|
31 |
<target name="setUp">
|
|
32 |
<echo>-------------------------------------------------------------------------------</echo>
|
|
33 |
<delete dir="${epocroot.temp}" failonerror="false" />
|
|
34 |
<delete dir="${epocroot}/epoc32" failonerror="false" />
|
|
35 |
<mkdir dir="${epocroot.temp}" />
|
|
36 |
</target>
|
|
37 |
|
|
38 |
<!-- is called after the test, even if that caused an error -->
|
|
39 |
<target name="tearDown">
|
|
40 |
<delete dir="${epocroot.temp}" failonerror="false" />
|
|
41 |
<delete dir="${epocroot}/epoc32" failonerror="false" />
|
|
42 |
<echo>-------------------------------------------------------------------------------</echo>
|
|
43 |
</target>
|
|
44 |
|
|
45 |
<target name="test-imaker-defaultconfig">
|
|
46 |
<hlm:emakeEngine id="imaker.ec" />
|
|
47 |
<hlm:imaker epocroot="${epocroot}"
|
|
48 |
output="${epocroot.temp}/output.log"
|
|
49 |
engineRefId="imaker.ec">
|
|
50 |
<hlm:imakerconfiguration>
|
|
51 |
<makefileset>
|
|
52 |
<include name="**/product/*ui.mk" />
|
|
53 |
</makefileset>
|
|
54 |
<targetset>
|
|
55 |
<include name="core" />
|
|
56 |
<include name="langpack_\d+" />
|
|
57 |
</targetset>
|
|
58 |
</hlm:imakerconfiguration>
|
|
59 |
</hlm:imaker>
|
|
60 |
<au:assertFileExists file="${epocroot.temp}/output.log" />
|
|
61 |
</target>
|
|
62 |
|
|
63 |
<target name="test-imaker-defaultconfig-custom-args">
|
|
64 |
<hlm:emakeEngine id="imaker.ec">
|
|
65 |
<arg value="--autodepends=1" />
|
|
66 |
</hlm:emakeEngine>
|
|
67 |
<hlm:imaker epocroot="${epocroot}"
|
|
68 |
output="${epocroot.temp}/output.log"
|
|
69 |
engineRefId="imaker.ec"
|
|
70 |
verbose="true">
|
|
71 |
<hlm:imakerconfiguration>
|
|
72 |
<makefileset>
|
|
73 |
<include name="**/product/*ui.mk" />
|
|
74 |
</makefileset>
|
|
75 |
<targetset>
|
|
76 |
<include name="core" />
|
|
77 |
<include name="langpack_\d+" />
|
|
78 |
</targetset>
|
|
79 |
</hlm:imakerconfiguration>
|
|
80 |
</hlm:imaker>
|
|
81 |
<au:assertLogContains text="--autodepends=1" />
|
|
82 |
<au:assertFileExists file="${epocroot.temp}/output.log" />
|
|
83 |
</target>
|
|
84 |
|
|
85 |
<target name="test-imaker-defaultconfig-with-cust-missing-template">
|
|
86 |
<hlm:emakeEngine id="imaker.ec" template="missing.mk.ftl">
|
|
87 |
<arg value="--autodepends=1" />
|
|
88 |
</hlm:emakeEngine>
|
|
89 |
<au:expectfailure message="Could not find template file:">
|
|
90 |
<hlm:imaker epocroot="${epocroot}"
|
|
91 |
output="${epocroot.temp}/output.log"
|
|
92 |
engineRefId="imaker.ec"
|
|
93 |
verbose="true">
|
|
94 |
<hlm:imakerconfiguration>
|
|
95 |
<makefileset>
|
|
96 |
<include name="**/product/*ui.mk" />
|
|
97 |
</makefileset>
|
|
98 |
<targetset>
|
|
99 |
<include name="core" />
|
|
100 |
<include name="langpack_\d+" />
|
|
101 |
</targetset>
|
|
102 |
</hlm:imakerconfiguration>
|
|
103 |
</hlm:imaker>
|
|
104 |
</au:expectfailure>
|
|
105 |
<au:assertFileDoesntExist file="${epocroot.temp}/output.log" />
|
|
106 |
</target>
|
|
107 |
|
|
108 |
<target name="test-imaker-defaultconfig-with-cust-invalid-template">
|
|
109 |
<hlm:emakeEngine id="imaker.ec" template="../emake_data/invalid.mk.ftl">
|
|
110 |
<arg value="--autodepends=1" />
|
|
111 |
</hlm:emakeEngine>
|
|
112 |
<au:expectfailure message="Error while rendering the makefile template:">
|
|
113 |
<hlm:imaker epocroot="${epocroot}"
|
|
114 |
output="${epocroot.temp}/output.log"
|
|
115 |
engineRefId="imaker.ec"
|
|
116 |
verbose="true">
|
|
117 |
<hlm:imakerconfiguration>
|
|
118 |
<makefileset>
|
|
119 |
<include name="**/product/*ui.mk" />
|
|
120 |
</makefileset>
|
|
121 |
<targetset>
|
|
122 |
<include name="core" />
|
|
123 |
<include name="langpack_\d+" />
|
|
124 |
</targetset>
|
|
125 |
</hlm:imakerconfiguration>
|
|
126 |
</hlm:imaker>
|
|
127 |
</au:expectfailure>
|
|
128 |
<au:assertLogContains text="invalid.mk.ftl" />
|
|
129 |
<au:assertFileDoesntExist file="${epocroot.temp}/output.log" />
|
|
130 |
</target>
|
|
131 |
|
|
132 |
<target name="test-imaker-defaultconfig-with-cust-template">
|
|
133 |
<hlm:emakeEngine id="imaker.ec" template="../emake_data/cust.mk.ftl">
|
|
134 |
<arg value="--autodepends=1" />
|
|
135 |
</hlm:emakeEngine>
|
|
136 |
<hlm:imaker epocroot="${epocroot}"
|
|
137 |
output="${epocroot.temp}/output.log"
|
|
138 |
engineRefId="imaker.ec"
|
|
139 |
verbose="true">
|
|
140 |
<hlm:imakerconfiguration>
|
|
141 |
<makefileset>
|
|
142 |
<include name="**/product/*ui.mk" />
|
|
143 |
</makefileset>
|
|
144 |
<targetset>
|
|
145 |
<include name="core" />
|
|
146 |
<include name="langpack_\d+" />
|
|
147 |
</targetset>
|
|
148 |
</hlm:imakerconfiguration>
|
|
149 |
</hlm:imaker>
|
|
150 |
<au:assertLogContains text="Loading template:" />
|
|
151 |
<au:assertLogContains text="cust.mk.ftl" />
|
|
152 |
<au:assertFileExists file="${epocroot.temp}/output.log" />
|
|
153 |
</target>
|
|
154 |
|
|
155 |
</project>
|