587
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_sbs_input.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 |
|
|
24 |
<project name="test-sbs-input" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
25 |
<description>Helium Antlib sbs unittests.</description>
|
|
26 |
|
|
27 |
<taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
|
|
28 |
<taskdef resource="com/nokia/helium/sbs/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
|
|
29 |
<dirname property="test.sbs.dir" file="${ant.file.test-sbs-input}"/>
|
|
30 |
<property name="working.dir" value="${test.sbs.dir}" />
|
|
31 |
<patternset id="includeLayerPatternSet" >
|
|
32 |
<include name="include_layer_.*"/>
|
|
33 |
</patternset>
|
|
34 |
|
|
35 |
<patternset id="includeNoneExistantLayerPatternSet" >
|
|
36 |
<include name="nonexistant_nclude_layer_.*"/>
|
|
37 |
</patternset>
|
|
38 |
|
|
39 |
<patternset id="emptySet" />
|
|
40 |
|
|
41 |
<patternset id="excludeLayerPatternSet" >
|
|
42 |
<exclude name="exclude_layer_.*" />
|
|
43 |
</patternset>
|
|
44 |
|
|
45 |
<patternset id="incExcludeLayerPatternSet" >
|
|
46 |
<include name="include_exclude_.*" />
|
|
47 |
<exclude name="include_exclude_non-matcher.*" />
|
|
48 |
</patternset>
|
|
49 |
|
|
50 |
<patternset id="includeSomeNoneExistantLayerPatternSet" >
|
|
51 |
<include name="include_exclude_.*" />
|
|
52 |
<exclude name="include_exclude_non-matcher.*" />
|
|
53 |
<include name="nonexistant_nclude_layer_.*"/>
|
|
54 |
</patternset>
|
|
55 |
|
|
56 |
<patternset id="includeUnitLayerPatternSet" >
|
|
57 |
<include name="api_test_layer" />
|
|
58 |
</patternset>
|
|
59 |
|
|
60 |
<patternset id="includeDefLayerPatternSet" >
|
|
61 |
<include name="use_layer_real_Def_layer" />
|
|
62 |
</patternset>
|
|
63 |
|
|
64 |
<patternset id="includeNoNameLayerPatternSet" >
|
|
65 |
<include name="use_no_name_layer" />
|
|
66 |
</patternset>
|
|
67 |
|
588
|
68 |
<patternset id="doNotIncludeAnyExistingLayer" >
|
|
69 |
<include name="non_existing_layer" />
|
|
70 |
</patternset>
|
|
71 |
|
587
|
72 |
<dirname property="project.dir" file="${ant.file.test-sbs-input}" />
|
|
73 |
|
|
74 |
<property name="build.system" value="sbs" />
|
|
75 |
|
|
76 |
<import file="${project.dir}/sbs_default_config.ant.xml" />
|
|
77 |
|
|
78 |
<target name="test-7952">
|
628
|
79 |
<echo message="-----------test-7952-----------" />
|
587
|
80 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
81 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
82 |
workingDir="${working.dir}" execute="false"/>
|
628
|
83 |
<au:assertLogContains text="-e emake" />
|
587
|
84 |
</target>
|
|
85 |
|
|
86 |
<target name="test-without-sysdef">
|
|
87 |
<property name="build.system" value="sbs" />
|
628
|
88 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
89 |
<au:expectfailure expectedMessage="'System Definition' file is missing" >
|
587
|
90 |
<hlm:sbstask outputLog="tmp" sbsinput="pf_7952" workingDir="${working.dir}" execute="false"/>
|
|
91 |
</au:expectfailure>
|
|
92 |
</target>
|
|
93 |
|
|
94 |
<target name="test-without-working-dir">
|
|
95 |
<property name="build.system" value="sbs" />
|
628
|
96 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
97 |
<au:expectfailure expectedMessage="'workingDir' must be set" >
|
587
|
98 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml" execute="false" />
|
|
99 |
</au:expectfailure>
|
|
100 |
</target>
|
|
101 |
|
|
102 |
<target name="test-sbs">
|
|
103 |
<property name="build.system" value="sbs" />
|
628
|
104 |
<hlm:getsbsinputs config="sf_build" outputProperty="sbs-inputs"/>
|
587
|
105 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
106 |
workingDir="${working.dir}" execute="false"/>
|
628
|
107 |
<au:expectfailure>
|
|
108 |
<au:assertLogContains text="-e emake" />
|
|
109 |
</au:expectfailure>
|
|
110 |
</target>
|
|
111 |
|
|
112 |
<target name="test-tools-sbs">
|
|
113 |
<property name="build.system" value="sbs" />
|
|
114 |
<hlm:getsbsinputs config="sf_build2" outputProperty="sbs-inputs"/>
|
|
115 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
116 |
workingDir="${working.dir}" execute="false"/>
|
|
117 |
<au:assertLogContains text="-c tools" />
|
587
|
118 |
</target>
|
|
119 |
|
|
120 |
<target name="test-sbs-ec">
|
|
121 |
<property name="build.system" value="sbs-ec" />
|
|
122 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
123 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
124 |
workingDir="${working.dir}" execute="false"/>
|
628
|
125 |
<au:assertLogContains text="-e emake" />
|
587
|
126 |
</target>
|
|
127 |
|
|
128 |
<target name="test-all-layers">
|
|
129 |
<property name="build.system" value="sbs" />
|
|
130 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
131 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
132 |
workingDir="${working.dir}" execute="false"/>
|
628
|
133 |
<au:assertLogContains text="test.sysdef.xml" />
|
587
|
134 |
</target>
|
|
135 |
|
|
136 |
<target name="test-include-layers">
|
|
137 |
<property name="build.system" value="sbs" />
|
|
138 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
139 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
628
|
140 |
layerPatternSetRef="includeLayerPatternSet" workingDir="${working.dir}"
|
587
|
141 |
execute="false"/>
|
|
142 |
<au:assertLogContains text="sbs" />
|
628
|
143 |
<au:assertLogContains text="-l include_layer_set" />
|
587
|
144 |
<au:expectfailure>
|
|
145 |
<au:assertLogContains text="-l exclude_layer_set" />
|
|
146 |
</au:expectfailure>
|
|
147 |
<au:expectfailure>
|
|
148 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
149 |
</au:expectfailure>
|
|
150 |
<au:expectfailure>
|
|
151 |
<au:assertLogContains text="-l include_exclude_non-matcher" />
|
|
152 |
</au:expectfailure>
|
|
153 |
</target>
|
|
154 |
|
|
155 |
<target name="test-exclude-layers">
|
|
156 |
<property name="build.system" value="sbs-ec" />
|
|
157 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
158 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
159 |
layerPatternSetRef="excludeLayerPatternSet"
|
|
160 |
workingDir="${working.dir}" execute="false"/>
|
628
|
161 |
<au:expectfailure>
|
|
162 |
<au:assertLogContains text="-l exclude_layer_set" />
|
|
163 |
</au:expectfailure>
|
587
|
164 |
<au:assertLogContains text="-l include_layer_set" />
|
|
165 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
166 |
<au:assertLogContains text="-l include_exclude_non-matcher" />
|
|
167 |
</target>
|
|
168 |
|
|
169 |
<target name="test-nonexistant-layers">
|
|
170 |
<property name="build.system" value="sbs" />
|
|
171 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
172 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
173 |
layerPatternSetRef="includeNoneExistantLayerPatternSet" workingDir="${working.dir}"
|
|
174 |
execute="false"/>
|
|
175 |
<au:assertLogContains text="No matching layer" />
|
|
176 |
</target>
|
|
177 |
|
|
178 |
<target name="test-nonexistant-with-some-layers">
|
|
179 |
<property name="build.system" value="sbs" />
|
|
180 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
181 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
182 |
layerPatternSetRef="includeSomeNoneExistantLayerPatternSet" workingDir="${working.dir}"
|
|
183 |
execute="false"/>
|
|
184 |
<au:expectfailure>
|
|
185 |
<au:assertLogContains text="-l exclude_layer_set" />
|
|
186 |
</au:expectfailure>
|
|
187 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
188 |
<au:expectfailure>
|
|
189 |
<au:assertLogContains text="-l include_exclude_non-matcher" />
|
|
190 |
</au:expectfailure>
|
|
191 |
</target>
|
|
192 |
|
|
193 |
<target name="test-include-unitID-layers">
|
|
194 |
<property name="build.system" value="sbs" />
|
|
195 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
196 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
197 |
layerPatternSetRef="includeUnitLayerPatternSet" workingDir="${working.dir}"
|
|
198 |
execute="false"/>
|
|
199 |
<au:assertLogContains text="sbs" />
|
|
200 |
<au:assertLogContains text="-l api_test_layer" />
|
|
201 |
</target>
|
|
202 |
|
|
203 |
<target name="test-include-exclude-layers">
|
|
204 |
<property name="build.system" value="sbs" />
|
|
205 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
206 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
628
|
207 |
layerPatternSetRef="incExcludeLayerPatternSet"
|
587
|
208 |
workingDir="${working.dir}" execute="false"/>
|
|
209 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
210 |
</target>
|
|
211 |
|
|
212 |
<target name="test-empty-pattern-set">
|
|
213 |
<property name="build.system" value="sbs-ec" />
|
628
|
214 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
215 |
<au:expectfailure expectedMessage="sbstask doesn't support" >
|
587
|
216 |
<hlm:sbstask outputLog="tmp" config="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
217 |
layerPatternSetRef="emptySet"
|
|
218 |
workingDir="${working.dir}" execute="false"/>
|
|
219 |
</au:expectfailure>
|
|
220 |
</target>
|
|
221 |
|
|
222 |
<target name="test-engine-inheritence1">
|
|
223 |
<property name="build.system" value="sbs-ec" />
|
628
|
224 |
<hlm:getsbsinputs config="inherit1" outputProperty="sbs-inputs"/>
|
|
225 |
<au:expectfailure expectedMessage="engine should not be null" >
|
587
|
226 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
227 |
workingDir="${working.dir}" execute="false"/>
|
|
228 |
</au:expectfailure>
|
|
229 |
</target>
|
|
230 |
|
|
231 |
<target name="test-engine-inheritence2">
|
|
232 |
<property name="build.system" value="sbs-ec" />
|
|
233 |
<hlm:getsbsinputs config="inherit2" outputProperty="sbs-inputs"/>
|
|
234 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml" workingDir="${working.dir}" execute="false"/>
|
|
235 |
<au:assertLogContains text="-e emake" />
|
|
236 |
</target>
|
|
237 |
|
|
238 |
<target name="test-engine-inheritence3">
|
|
239 |
<property name="build.system" value="sbs-ec" />
|
628
|
240 |
<hlm:getsbsinputs config="inherit3" outputProperty="sbs-inputs"/>
|
|
241 |
<au:expectfailure expectedMessage="Config's engine type ec-helium not matching" >
|
587
|
242 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
243 |
workingDir="${working.dir}" execute="false"/>
|
|
244 |
</au:expectfailure>
|
|
245 |
</target>
|
|
246 |
|
|
247 |
<target name="test-engine-inheritence4">
|
|
248 |
<property name="build.system" value="sbs-ec" />
|
|
249 |
<hlm:getsbsinputs config="inherit4" outputProperty="sbs-inputs"/>
|
|
250 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml" workingDir="${working.dir}" execute="false"/>
|
|
251 |
<au:assertLogContains text="-e emake" />
|
|
252 |
<au:assertLogContains text="logfile" />
|
|
253 |
</target>
|
|
254 |
|
|
255 |
<target name="test-getinputs">
|
|
256 |
<property name="build.system" value="sbs-ec" />
|
|
257 |
<hlm:getsbsinputs config="inherit3" outputProperty="sbs-inputs"/>
|
|
258 |
<echo message="sbs-inputs: ${sbs-inputs}" />
|
588
|
259 |
<hlm:getVariableValue name="-f" property="sbs.log.file">
|
587
|
260 |
<hlm:sbsinput refid="${sbs-inputs}" />
|
588
|
261 |
</hlm:getVariableValue>
|
587
|
262 |
<echo message="${sbs-inputs}" />
|
628
|
263 |
<au:assertLogContains text="inherit3_sbs_input" />
|
587
|
264 |
</target>
|
|
265 |
|
|
266 |
<target name="test-include-def-layer">
|
|
267 |
<property name="build.system" value="sbs" />
|
|
268 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
269 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
270 |
layerPatternSetRef="includeDefLayerPatternSet" workingDir="${working.dir}"
|
|
271 |
execute="false"/>
|
|
272 |
<au:assertLogContains text="sbs" />
|
628
|
273 |
<au:assertLogContains text="-l use_layer_real_Def_layer" />
|
587
|
274 |
</target>
|
|
275 |
|
|
276 |
<target name="test-include-error-layer">
|
|
277 |
<property name="build.system" value="sbs" />
|
|
278 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
279 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
280 |
layerPatternSetRef="includeNoNameLayerPatternSet" workingDir="${working.dir}"
|
|
281 |
execute="false"/>
|
|
282 |
<au:assertLogContains text="-l use_no_name_layer" />
|
|
283 |
</target>
|
|
284 |
|
588
|
285 |
<target name="test-include-no-layer">
|
587
|
286 |
<property name="build.system" value="sbs" />
|
|
287 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
588
|
288 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
289 |
layerPatternSetRef="doNotIncludeAnyExistingLayer" workingDir="${working.dir}"
|
587
|
290 |
execute="false"/>
|
588
|
291 |
<au:assertLogContains text="--logfile" />
|
|
292 |
<au:assertLogContains text="Warning: No matching layers to build from system definition file, skipped" />
|
587
|
293 |
</target>
|
|
294 |
|
|
295 |
</project> |