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 |
<taskdef name="getVariableValue" classname="com.nokia.helium.core.ant.taskdefs.GetValueFromVariableSet"/>
|
|
30 |
<dirname property="test.sbs.dir" file="${ant.file.test-sbs-input}"/>
|
|
31 |
<property name="working.dir" value="${test.sbs.dir}" />
|
|
32 |
<patternset id="includeLayerPatternSet" >
|
|
33 |
<include name="include_layer_.*"/>
|
|
34 |
</patternset>
|
|
35 |
|
|
36 |
<patternset id="includeNoneExistantLayerPatternSet" >
|
|
37 |
<include name="nonexistant_nclude_layer_.*"/>
|
|
38 |
</patternset>
|
|
39 |
|
|
40 |
<patternset id="emptySet" />
|
|
41 |
|
|
42 |
<patternset id="excludeLayerPatternSet" >
|
|
43 |
<exclude name="exclude_layer_.*" />
|
|
44 |
</patternset>
|
|
45 |
|
|
46 |
<patternset id="incExcludeLayerPatternSet" >
|
|
47 |
<include name="include_exclude_.*" />
|
|
48 |
<exclude name="include_exclude_non-matcher.*" />
|
|
49 |
</patternset>
|
|
50 |
|
|
51 |
<patternset id="includeSomeNoneExistantLayerPatternSet" >
|
|
52 |
<include name="include_exclude_.*" />
|
|
53 |
<exclude name="include_exclude_non-matcher.*" />
|
|
54 |
<include name="nonexistant_nclude_layer_.*"/>
|
|
55 |
</patternset>
|
|
56 |
|
|
57 |
<patternset id="includeUnitLayerPatternSet" >
|
|
58 |
<include name="api_test_layer" />
|
|
59 |
</patternset>
|
|
60 |
|
|
61 |
<patternset id="includeDefLayerPatternSet" >
|
|
62 |
<include name="use_layer_real_Def_layer" />
|
|
63 |
</patternset>
|
|
64 |
|
|
65 |
<patternset id="includeNoNameLayerPatternSet" >
|
|
66 |
<include name="use_no_name_layer" />
|
|
67 |
</patternset>
|
|
68 |
|
|
69 |
<dirname property="project.dir" file="${ant.file.test-sbs-input}" />
|
|
70 |
|
|
71 |
<property name="build.system" value="sbs" />
|
|
72 |
|
|
73 |
<import file="${project.dir}/sbs_default_config.ant.xml" />
|
|
74 |
|
|
75 |
<target name="test-7952">
|
|
76 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
77 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
78 |
workingDir="${working.dir}" execute="false"/>
|
|
79 |
</target>
|
|
80 |
|
|
81 |
<target name="test-without-sysdef">
|
|
82 |
<property name="build.system" value="sbs" />
|
|
83 |
<au:expectfailure>
|
|
84 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
85 |
<hlm:sbstask outputLog="tmp" sbsinput="pf_7952" workingDir="${working.dir}" execute="false"/>
|
|
86 |
</au:expectfailure>
|
|
87 |
</target>
|
|
88 |
|
|
89 |
<target name="test-without-working-dir">
|
|
90 |
<property name="build.system" value="sbs" />
|
|
91 |
<au:expectfailure>
|
|
92 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
93 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml" execute="false" />
|
|
94 |
</au:expectfailure>
|
|
95 |
</target>
|
|
96 |
|
|
97 |
<target name="test-sbs">
|
|
98 |
<property name="build.system" value="sbs" />
|
|
99 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
100 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
101 |
workingDir="${working.dir}" execute="false"/>
|
|
102 |
</target>
|
|
103 |
|
|
104 |
<target name="test-sbs-ec">
|
|
105 |
<property name="build.system" value="sbs-ec" />
|
|
106 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
107 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
108 |
workingDir="${working.dir}" execute="false"/>
|
|
109 |
</target>
|
|
110 |
|
|
111 |
<target name="test-all-layers">
|
|
112 |
<property name="build.system" value="sbs" />
|
|
113 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
114 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
115 |
workingDir="${working.dir}" execute="false"/>
|
|
116 |
</target>
|
|
117 |
|
|
118 |
<target name="test-include-layers">
|
|
119 |
<property name="build.system" value="sbs" />
|
|
120 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
121 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
122 |
layerPatternSetRef="includeLayerPatternSet" workingDir="${working.dir}"
|
|
123 |
execute="false"/>
|
|
124 |
<au:assertLogContains text="sbs" />
|
|
125 |
<au:expectfailure>
|
|
126 |
<au:assertLogContains text="-l exclude_layer_set" />
|
|
127 |
</au:expectfailure>
|
|
128 |
<au:expectfailure>
|
|
129 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
130 |
</au:expectfailure>
|
|
131 |
<au:expectfailure>
|
|
132 |
<au:assertLogContains text="-l include_exclude_non-matcher" />
|
|
133 |
</au:expectfailure>
|
|
134 |
</target>
|
|
135 |
|
|
136 |
<target name="test-exclude-layers">
|
|
137 |
<property name="build.system" value="sbs-ec" />
|
|
138 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
139 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
140 |
layerPatternSetRef="excludeLayerPatternSet"
|
|
141 |
workingDir="${working.dir}" execute="false"/>
|
|
142 |
<au:assertLogContains text="-l include_layer_set" />
|
|
143 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
144 |
<au:assertLogContains text="-l include_exclude_non-matcher" />
|
|
145 |
</target>
|
|
146 |
|
|
147 |
<target name="test-nonexistant-layers">
|
|
148 |
<property name="build.system" value="sbs" />
|
|
149 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
150 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
151 |
layerPatternSetRef="includeNoneExistantLayerPatternSet" workingDir="${working.dir}"
|
|
152 |
execute="false"/>
|
|
153 |
<au:assertLogContains text="No matching layer" />
|
|
154 |
</target>
|
|
155 |
|
|
156 |
<target name="test-nonexistant-with-some-layers">
|
|
157 |
<property name="build.system" value="sbs" />
|
|
158 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
159 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
160 |
layerPatternSetRef="includeSomeNoneExistantLayerPatternSet" workingDir="${working.dir}"
|
|
161 |
execute="false"/>
|
|
162 |
<au:expectfailure>
|
|
163 |
<au:assertLogContains text="-l exclude_layer_set" />
|
|
164 |
</au:expectfailure>
|
|
165 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
166 |
<au:expectfailure>
|
|
167 |
<au:assertLogContains text="-l include_exclude_non-matcher" />
|
|
168 |
</au:expectfailure>
|
|
169 |
</target>
|
|
170 |
|
|
171 |
<target name="test-include-unitID-layers">
|
|
172 |
<property name="build.system" value="sbs" />
|
|
173 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
174 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
175 |
layerPatternSetRef="includeUnitLayerPatternSet" workingDir="${working.dir}"
|
|
176 |
execute="false"/>
|
|
177 |
<au:assertLogContains text="sbs" />
|
|
178 |
<au:assertLogContains text="-l api_test_layer" />
|
|
179 |
</target>
|
|
180 |
|
|
181 |
<target name="test-include-exclude-layers">
|
|
182 |
<property name="build.system" value="sbs" />
|
|
183 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
184 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
185 |
layerPatternSetRef="incExcludeLayerPatternSet"
|
|
186 |
workingDir="${working.dir}" execute="false"/>
|
|
187 |
<au:assertLogContains text="-l include_exclude_matcher" />
|
|
188 |
</target>
|
|
189 |
|
|
190 |
<target name="test-empty-pattern-set">
|
|
191 |
<property name="build.system" value="sbs-ec" />
|
|
192 |
<au:expectfailure>
|
|
193 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
194 |
<hlm:sbstask outputLog="tmp" config="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
195 |
layerPatternSetRef="emptySet"
|
|
196 |
workingDir="${working.dir}" execute="false"/>
|
|
197 |
</au:expectfailure>
|
|
198 |
</target>
|
|
199 |
|
|
200 |
<target name="test-engine-inheritence1">
|
|
201 |
<property name="build.system" value="sbs-ec" />
|
|
202 |
<au:expectfailure>
|
|
203 |
<hlm:getsbsinputs config="inherit1" outputProperty="sbs-inputs"/>
|
|
204 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
205 |
workingDir="${working.dir}" execute="false"/>
|
|
206 |
</au:expectfailure>
|
|
207 |
</target>
|
|
208 |
|
|
209 |
<target name="test-engine-inheritence2">
|
|
210 |
<property name="build.system" value="sbs-ec" />
|
|
211 |
<hlm:getsbsinputs config="inherit2" outputProperty="sbs-inputs"/>
|
|
212 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml" workingDir="${working.dir}" execute="false"/>
|
|
213 |
<au:assertLogContains text="-e emake" />
|
|
214 |
</target>
|
|
215 |
|
|
216 |
<target name="test-engine-inheritence3">
|
|
217 |
<property name="build.system" value="sbs-ec" />
|
|
218 |
<au:expectfailure>
|
|
219 |
<hlm:getsbsinputs config="inherit3" outputProperty="sbs-inputs"/>
|
|
220 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
221 |
workingDir="${working.dir}" execute="false"/>
|
|
222 |
</au:expectfailure>
|
|
223 |
</target>
|
|
224 |
|
|
225 |
<target name="test-engine-inheritence4">
|
|
226 |
<property name="build.system" value="sbs-ec" />
|
|
227 |
<hlm:getsbsinputs config="inherit4" outputProperty="sbs-inputs"/>
|
|
228 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml" workingDir="${working.dir}" execute="false"/>
|
|
229 |
<au:assertLogContains text="-e emake" />
|
|
230 |
<au:assertLogContains text="logfile" />
|
|
231 |
</target>
|
|
232 |
|
|
233 |
<target name="test-getinputs">
|
|
234 |
<property name="build.system" value="sbs-ec" />
|
|
235 |
<hlm:getsbsinputs config="inherit3" outputProperty="sbs-inputs"/>
|
|
236 |
<echo message="sbs-inputs: ${sbs-inputs}" />
|
|
237 |
<getVariableValue name="-f" property="sbs.log.file">
|
|
238 |
<hlm:sbsinput refid="${sbs-inputs}" />
|
|
239 |
</getVariableValue>
|
|
240 |
<echo message="${sbs-inputs}" />
|
|
241 |
</target>
|
|
242 |
|
|
243 |
<target name="test-include-def-layer">
|
|
244 |
<property name="build.system" value="sbs" />
|
|
245 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
246 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
247 |
layerPatternSetRef="includeDefLayerPatternSet" workingDir="${working.dir}"
|
|
248 |
execute="false"/>
|
|
249 |
<au:assertLogContains text="sbs" />
|
|
250 |
</target>
|
|
251 |
|
|
252 |
<target name="test-include-error-layer">
|
|
253 |
<property name="build.system" value="sbs" />
|
|
254 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
255 |
<hlm:sbstask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
256 |
layerPatternSetRef="includeNoNameLayerPatternSet" workingDir="${working.dir}"
|
|
257 |
execute="false"/>
|
|
258 |
<au:assertLogContains text="-l use_no_name_layer" />
|
|
259 |
</target>
|
|
260 |
|
|
261 |
<target name="test-ctc">
|
|
262 |
<property name="build.system" value="sbs" />
|
|
263 |
<hlm:getsbsinputs config="pf_7952" outputProperty="sbs-inputs"/>
|
|
264 |
<hlm:ctctask outputLog="tmp" sbsinput="${sbs-inputs}" sysdefFile="../data/test.sysdef.xml"
|
|
265 |
layerPatternSetRef="includeNoNameLayerPatternSet" workingDir="${working.dir}"
|
|
266 |
execute="false"/>
|
|
267 |
<au:assertLogContains text="-i m sbs" />
|
|
268 |
</target>
|
|
269 |
|
|
270 |
</project> |