587
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_antlint.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 |
-->
|
645
|
23 |
<project name="test-antlint" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
|
587
|
24 |
<description>Helium Antlib AntLint unittests.</description>
|
|
25 |
|
|
26 |
<dirname property="antlint.test.dir" file="${ant.file.test-antlint}/.."/>
|
|
27 |
|
|
28 |
<import file="${antlint.test.dir}/data/sample.ant.xml" />
|
|
29 |
|
588
|
30 |
<taskdef resource="com/nokia/helium/antlint/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
|
|
31 |
|
587
|
32 |
<property name="data.model.parsed" location="${antlint.test.dir}/data/datamodel.out"/>
|
|
33 |
|
|
34 |
<!-- is called prior to the test -->
|
|
35 |
<target name="setUp">
|
588
|
36 |
<delete dir="${antlint.test.dir}/data/output" failonerror="false" />
|
|
37 |
<mkdir dir="${antlint.test.dir}/data/output" />
|
587
|
38 |
</target>
|
|
39 |
|
|
40 |
<!-- is called after the test, even if that caused an error -->
|
|
41 |
<target name="tearDown">
|
588
|
42 |
<delete dir="${antlint.test.dir}/data/output" failonerror="false" />
|
587
|
43 |
</target>
|
|
44 |
|
645
|
45 |
<target name="test-check-antcall">
|
|
46 |
<hlm:antlint>
|
|
47 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
48 |
<include name="sample.ant.xml"/>
|
|
49 |
</fileset>
|
|
50 |
<hlm:checkAntCall severity="warning"/>
|
|
51 |
</hlm:antlint>
|
|
52 |
<au:assertLogContains text="antcall> is used with no param elements and calls the target 'hello' that has no dependencies!" level="info"/>
|
|
53 |
</target>
|
|
54 |
|
|
55 |
<target name="test-check-description">
|
|
56 |
<hlm:antlint>
|
|
57 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
58 |
<include name="build.xml"/>
|
|
59 |
</fileset>
|
|
60 |
<hlm:checkDescription severity="warning"/>
|
|
61 |
</hlm:antlint>
|
|
62 |
<au:assertLogContains text="WARNING: 23: Description not specified!" level="info"/>
|
|
63 |
</target>
|
|
64 |
|
|
65 |
<target name="test-check-duplicate-names">
|
|
66 |
<hlm:antlint>
|
|
67 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
68 |
<include name="*.xml"/>
|
|
69 |
<include name="*.ant.xml"/>
|
|
70 |
<include name="build.xml"/>
|
|
71 |
<include name="*.antlib.xml"/>
|
|
72 |
</fileset>
|
|
73 |
<hlm:checkDuplicateNames severity="warning"/>
|
|
74 |
</hlm:antlint>
|
|
75 |
<au:assertLogContains text="WARNING: 101: Task 'antlint' and macro 'antlint' has duplicate name." level="info"/>
|
|
76 |
</target>
|
|
77 |
|
|
78 |
<target name="test-check-filename">
|
|
79 |
<hlm:antlint>
|
|
80 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
81 |
<include name="invalid.build.xml"/>
|
|
82 |
</fileset>
|
|
83 |
<hlm:checkFileName severity="warning" regexp="^build.xml$|ant.xml$|antlib.xml$" />
|
|
84 |
</hlm:antlint>
|
|
85 |
<au:assertLogContains text="WARNING: Invalid file Name:" level="info"/>
|
|
86 |
</target>
|
|
87 |
|
|
88 |
<target name="test-check-script-size">
|
|
89 |
<hlm:antlint>
|
|
90 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
91 |
<include name="sample.ant.xml"/>
|
|
92 |
</fileset>
|
|
93 |
<hlm:checkScriptSize enabled="true" severity="warning"/>
|
|
94 |
</hlm:antlint>
|
|
95 |
<au:assertLogContains text="WARNING: 77: Target check-script-size has a script with 1188 characters, code should be inside a python file" level="info"/>
|
|
96 |
</target>
|
|
97 |
|
|
98 |
<target name="test-check-presetdef-macrodef-name">
|
|
99 |
<hlm:antlint>
|
|
100 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
101 |
<include name="sample.antlib.xml"/>
|
|
102 |
<include name="sample.ant.xml"/>
|
|
103 |
</fileset>
|
|
104 |
<hlm:checkPresetDefMacroDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>
|
|
105 |
</hlm:antlint>
|
|
106 |
<au:assertLogContains text="WARNING: 45: Invalid presetdef/macrodef name: check_PresetDef.Name" level="info"/>
|
|
107 |
<au:assertLogContains text="WARNING: 27: Invalid presetdef/macrodef name: foo_Macro" level="info"/>
|
|
108 |
</target>
|
|
109 |
|
|
110 |
<target name="test-check-runtarget">
|
|
111 |
<hlm:antlint>
|
|
112 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
113 |
<include name="sample.ant.xml"/>
|
|
114 |
</fileset>
|
|
115 |
<hlm:checkRunTarget enabled="true" severity="warning"/>
|
|
116 |
</hlm:antlint>
|
|
117 |
<au:assertLogContains text="runtarget> calls the target smile that has dependencies!" level="info"/>
|
|
118 |
</target>
|
|
119 |
|
|
120 |
<target name="test-check-scriptdef-style">
|
|
121 |
<hlm:antlint>
|
|
122 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
123 |
<include name="sample.antlib.xml"/>
|
|
124 |
</fileset>
|
|
125 |
<hlm:checkScriptDefStyle severity="warning" />
|
|
126 |
</hlm:antlint>
|
|
127 |
<au:assertLogContains text="WARNING: 65: Scriptdef check-scriptdef-style doesn't reference attributes directly, poor style" level="info"/>
|
|
128 |
</target>
|
|
129 |
|
|
130 |
<target name="test-check-script-condition">
|
|
131 |
<hlm:antlint>
|
|
132 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
133 |
<include name="sample.ant.xml"/>
|
|
134 |
<include name="sample.antlib.xml"/>
|
|
135 |
</fileset>
|
|
136 |
<hlm:checkScriptCondition severity="warning"/>
|
|
137 |
</hlm:antlint>
|
|
138 |
<au:assertLogContains text=" found in target_check-scriptcondition" level="info"/>
|
|
139 |
</target>
|
|
140 |
|
588
|
141 |
<target name="test-check-tab-character">
|
|
142 |
<hlm:antlint>
|
|
143 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
144 |
<include name="build.xml"/>
|
|
145 |
</fileset>
|
|
146 |
<hlm:checkTabCharacter severity="warning" enabled="true"/>
|
|
147 |
</hlm:antlint>
|
|
148 |
<au:assertLogContains text="WARNING: 25: Tabs should not be used!" level="info"/>
|
645
|
149 |
<au:assertLogContains text="WARNING: 31: Target test2 has a script with tabs" level="info"/>
|
588
|
150 |
</target>
|
587
|
151 |
|
588
|
152 |
<target name="test-check-property-name">
|
|
153 |
<hlm:antlint>
|
|
154 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
155 |
<include name="sample.ant.xml"/>
|
|
156 |
</fileset>
|
|
157 |
<hlm:checkPropertyName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" />
|
|
158 |
</hlm:antlint>
|
645
|
159 |
<au:assertLogContains text="WARNING: 42: Invalid property name: check-property-name" level="info"/>
|
588
|
160 |
</target>
|
|
161 |
|
|
162 |
<target name="test-check-target-name">
|
|
163 |
<hlm:antlint>
|
|
164 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
165 |
<include name="sample.ant.xml"/>
|
|
166 |
</fileset>
|
|
167 |
<hlm:checkTargetName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\-]]*)" />
|
|
168 |
</hlm:antlint>
|
645
|
169 |
<au:assertLogContains text="WARNING: 64: INVALID Target Name: Check_target.Name" level="info"/>
|
588
|
170 |
</target>
|
|
171 |
|
645
|
172 |
<target name="test-check-use-of-equals-task">
|
|
173 |
<hlm:antlint>
|
|
174 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
175 |
<include name="sample.ant.xml"/>
|
|
176 |
</fileset>
|
|
177 |
<hlm:checkUseOfEqualsTask severity="warning" enabled="true"/>
|
|
178 |
</hlm:antlint>
|
|
179 |
<au:assertLogContains text="WARNING: 209: test.boolean1 uses 'equals', should use 'istrue' task" level="info"/>
|
|
180 |
<au:assertLogContains text="WARNING: 210: test.boolean2 uses 'equals', should use 'istrue' task" level="info"/>
|
|
181 |
</target>
|
|
182 |
|
|
183 |
<target name="test-check-use-of-if-in-targets">
|
|
184 |
<hlm:antlint>
|
|
185 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
186 |
<include name="sample.ant.xml"/>
|
|
187 |
</fileset>
|
|
188 |
<hlm:checkUseOfIfInTargets enabled="true" severity="warning"/>
|
|
189 |
</hlm:antlint>
|
|
190 |
<au:assertLogContains text="WARNING: 126: Target check-use-of-if-in-targets poor use of if statement, use" level="info"/>
|
|
191 |
<au:assertLogContains text="WARNING: 136: Target check-use-of-if-else-in-targets poor use of if-else-property statement, use condition task" level="info"/>
|
|
192 |
<au:assertLogContains text="WARNING: 151: Target check-use-of-if-then-in-targets poor use of if-then-property statement, use condition task" level="info"/>
|
|
193 |
<au:assertLogContains text="WARNING: 173: Target check-prop-in-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
|
|
194 |
<au:assertLogContains text="WARNING: 229: Target check-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
|
|
195 |
</target>
|
|
196 |
|
|
197 |
<target name="test-check-try-catch-block-with-empty-catch-block">
|
|
198 |
<hlm:antlint>
|
|
199 |
<fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
|
|
200 |
<hlm:checkTryCatchBlock severity="warning" />
|
|
201 |
</hlm:antlint>
|
|
202 |
<au:assertLogContains text="trycatch> block found without " level="info"/>
|
|
203 |
</target>
|
|
204 |
|
|
205 |
<target name="test-check-try-catch-block-with-multiple-catch-block">
|
|
206 |
<hlm:antlint>
|
|
207 |
<fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
|
|
208 |
<hlm:checkTryCatchBlock severity="warning" />
|
|
209 |
</hlm:antlint>
|
|
210 |
<au:assertLogContains text="trycatch> block found with 2 " level="info"/>
|
|
211 |
</target>
|
|
212 |
|
588
|
213 |
<target name="test-check-indentation">
|
|
214 |
<hlm:antlint>
|
|
215 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
216 |
<include name="sample.ant.xml"/>
|
|
217 |
</fileset>
|
|
218 |
<hlm:checkIndentation severity="warning" enabled="true"/>
|
|
219 |
</hlm:antlint>
|
645
|
220 |
<au:assertLogContains text="WARNING: 252: Bad indentation" level="info"/>
|
588
|
221 |
</target>
|
|
222 |
|
|
223 |
<target name="test-check-project-name">
|
|
224 |
<hlm:antlint>
|
|
225 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
226 |
<include name="sample.ant.xml"/>
|
|
227 |
<include name="invalid.build.xml"/>
|
|
228 |
</fileset>
|
|
229 |
<hlm:checkProjectName enabled="true" severity="warning" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
|
|
230 |
</hlm:antlint>
|
645
|
231 |
<au:assertLogContains text="WARNING: 23: Invalid project name: Sample" level="info"/>
|
|
232 |
<au:assertLogContains text="WARNING: 23: Project name not specified!" level="info"/>
|
588
|
233 |
</target>
|
|
234 |
|
|
235 |
<target name="test-antlint-failonerror-false">
|
|
236 |
<hlm:antlint failonerror="false">
|
|
237 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
238 |
<include name="*.xml"/>
|
|
239 |
<include name="*.ant.xml"/>
|
|
240 |
<include name="build.xml"/>
|
|
241 |
<include name="*.antlib.xml"/>
|
|
242 |
</fileset>
|
|
243 |
<hlm:checkTabCharacter severity="error" enabled="true"/>
|
|
244 |
<hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
|
645
|
245 |
<hlm:checkScriptDefAttributes severity="error" />
|
588
|
246 |
</hlm:antlint>
|
645
|
247 |
<au:assertLogContains text="ERROR: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
|
|
248 |
<au:assertLogContains text="ERROR: 23: Project name not specified!" level="info"/>
|
588
|
249 |
</target>
|
|
250 |
|
|
251 |
<target name="test-antlint-failonerror-true">
|
|
252 |
<au:expectfailure>
|
|
253 |
<hlm:antlint>
|
|
254 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
255 |
<include name="*.xml"/>
|
|
256 |
<include name="*.ant.xml"/>
|
|
257 |
<include name="build.xml"/>
|
|
258 |
<include name="*.antlib.xml"/>
|
|
259 |
</fileset>
|
|
260 |
<hlm:checkTabCharacter severity="error" enabled="true"/>
|
|
261 |
<hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
|
645
|
262 |
<hlm:checkScriptDefAttributes severity="error" />
|
588
|
263 |
</hlm:antlint>
|
|
264 |
</au:expectfailure>
|
645
|
265 |
<au:assertLogContains text="ERROR: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
|
|
266 |
<au:assertLogContains text="ERROR: 23: Project name not specified!" level="info"/>
|
588
|
267 |
</target>
|
|
268 |
|
|
269 |
<target name="test-antlint-console-and-xml-reporting">
|
|
270 |
<au:expectfailure>
|
|
271 |
<hlm:antlint>
|
|
272 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
273 |
<include name="*.xml"/>
|
|
274 |
<include name="*.ant.xml"/>
|
|
275 |
<include name="build.xml"/>
|
|
276 |
<include name="*.antlib.xml"/>
|
|
277 |
</fileset>
|
|
278 |
<hlm:checkTabCharacter severity="error" enabled="true"/>
|
|
279 |
<hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
|
645
|
280 |
<hlm:checkScriptDefAttributes severity="error" />
|
|
281 |
|
588
|
282 |
<!-- reporters -->
|
|
283 |
<hlm:antlintCheckstyleReporter file="${antlint.test.dir}/data/output/report.xml" />
|
|
284 |
<hlm:antlintConsoleReporter />
|
|
285 |
</hlm:antlint>
|
|
286 |
</au:expectfailure>
|
645
|
287 |
<au:assertLogContains text="ERROR: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
|
|
288 |
<au:assertLogContains text="ERROR: 23: Project name not specified!" level="info"/>
|
588
|
289 |
<au:assertFileExists file="${antlint.test.dir}/data/output/report.xml" />
|
|
290 |
<loadfile property="report.xml" srcfile="${antlint.test.dir}/data/output/report.xml" />
|
|
291 |
<echo>${report.xml}</echo>
|
|
292 |
<au:assertTrue>
|
|
293 |
<and>
|
|
294 |
<contains string="${report.xml}" substring="<error" />
|
|
295 |
<contains string="${report.xml}" substring="Scriptdef check-scriptdef-attributes does not have attribute target" />
|
|
296 |
<contains string="${report.xml}" substring="Project name not specified!" />
|
|
297 |
</and>
|
|
298 |
</au:assertTrue>
|
|
299 |
</target>
|
645
|
300 |
|
|
301 |
<target name="test-antcontrib-var-type-value-unset-set-case">
|
|
302 |
<au:expectfailure>
|
|
303 |
<hlm:antlint>
|
|
304 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
305 |
<include name="sample.ant.xml"/>
|
|
306 |
</fileset>
|
|
307 |
<hlm:checkVariableTask severity="error" />
|
|
308 |
</hlm:antlint>
|
|
309 |
</au:expectfailure>
|
|
310 |
<au:assertLogContains text="ERROR: 30: Variable 'var1' should not have 'value' attribute set when 'unset' is true." level="info"/>
|
|
311 |
</target>
|
|
312 |
|
|
313 |
<target name="test-invalid-property-type-values">
|
628
|
314 |
<au:expectfailure>
|
|
315 |
<hlm:antlint>
|
645
|
316 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
317 |
<include name="sample.ant.xml"/>
|
|
318 |
</fileset>
|
|
319 |
<hlm:checkPropertyTypeAndValueMismatch severity="error" />
|
628
|
320 |
</hlm:antlint>
|
|
321 |
</au:expectfailure>
|
645
|
322 |
<au:assertLogContains text="ERROR: 324: Property 'test.prop.int.2' has invalid integer value set as '123abc'." level="info"/>
|
|
323 |
<au:assertLogContains text="ERROR: 342: Property 'test.prop.bool.3' has invalid boolean value set as 't'. (Valid values: true|false)" level="info"/>
|
|
324 |
<au:assertLogContains text="ERROR: 348: Property 'test.prop.bool.4' has invalid boolean value set as 'f'. (Valid values: true|false)" level="info"/>
|
|
325 |
<au:assertLogContains text="ERROR: 354: Property 'test.prop.bool.5' has invalid boolean value set as 'yes'. (Valid values: true|false)" level="info"/>
|
|
326 |
<au:assertLogContains text="ERROR: 360: Property 'test.prop.bool.6' has invalid boolean value set as 'no'. (Valid values: true|false)" level="info"/>
|
|
327 |
<au:assertLogContains text="ERROR: 366: Property 'test.prop.bool.7' has invalid boolean value set as 'poo'. (Valid values: true|false)" level="info"/>
|
|
328 |
<au:assertLogContains text="ERROR: 393: Property 'test.prop.number.1' has invalid type as 'number'. (Valid types: boolean|float|integer|string)" level="info"/>
|
|
329 |
<au:assertLogContains text="ERROR: 399: Property 'test.prop.flag' has invalid type as 'flag'. (Valid types: boolean|float|integer|string)" level="info"/>
|
|
330 |
<au:assertLogContains text="ERROR: 411: Property 'test.prop.float.2' has invalid float value set as '1.5a'." level="info"/>
|
|
331 |
<au:assertLogContains text="ERROR: 417: Property 'test.prop.int.3' has invalid integer value set as '1.8'." level="info"/>
|
|
332 |
</target>
|
|
333 |
|
|
334 |
|
|
335 |
<target name="test-check-scriptdef-name">
|
|
336 |
<hlm:antlint>
|
|
337 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
338 |
<include name="sample.antlib.xml"/>
|
|
339 |
</fileset>
|
|
340 |
<hlm:checkScriptDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>
|
|
341 |
</hlm:antlint>
|
|
342 |
<au:assertLogContains text="WARNING: 34: Invalid scriptdef name: check-prop-in-scriptdef" level="info"/>
|
|
343 |
<au:assertLogContains text="WARNING: 65: Invalid scriptdef name: check-scriptdef-style" level="info"/>
|
628
|
344 |
</target>
|
|
345 |
|
645
|
346 |
<target name="test-check-scriptdef-attributes">
|
|
347 |
<hlm:antlint>
|
|
348 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
349 |
<include name="sample.antlib.xml"/>
|
|
350 |
</fileset>
|
|
351 |
<hlm:checkScriptDefAttributes severity="warning"/>
|
|
352 |
</hlm:antlint>
|
|
353 |
<au:assertLogContains text="WARNING: 40: Scriptdef check-scriptdef does not use attr2" level="info"/>
|
|
354 |
<au:assertLogContains text="WARNING: 46: Scriptdef checkScriptdefBeanshell does not use attr2" level="info"/>
|
|
355 |
<au:assertLogContains text="WARNING: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
|
|
356 |
<au:assertLogContains text="WARNING: 84: Scriptdef checkScriptdefAttributes does not have attribute attr0" level="info"/>
|
|
357 |
</target>
|
|
358 |
|
|
359 |
<target name="test-beanshell-script-dump-task">
|
|
360 |
<hlm:antlint>
|
|
361 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
362 |
<include name="sample.antlib.xml"/>
|
|
363 |
</fileset>
|
|
364 |
<hlm:checkstyleExecutor outputDir="${antlint.test.dir}/data/output/beanshell" config="${antlint.test.dir}/data/config/java_checkstyle_config.xml">
|
|
365 |
<formatter type="plain"/>
|
|
366 |
</hlm:checkstyleExecutor>
|
|
367 |
</hlm:antlint>
|
|
368 |
<au:assertLogContains text="BeanshellcheckScriptdefAttributes.java:1: warning: Using the '.*' form of import should be avoided - java.io.*." level="info"/>
|
|
369 |
<au:assertLogContains text="BeanshellcheckScriptdefBeanshell.java:1: warning: Using the '.*' form of import should be avoided - java.io.*." level="info"/>
|
|
370 |
</target>
|
|
371 |
|
|
372 |
<target name="test-check-jython-script">
|
|
373 |
<hlm:antlint>
|
|
374 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
375 |
<include name="sample.ant.xml"/>
|
|
376 |
<include name="sample.antlib.xml"/>
|
|
377 |
</fileset>
|
|
378 |
<hlm:checkJythonScript severity="warning"/>
|
|
379 |
</hlm:antlint>
|
|
380 |
<au:assertLogContains text="found in target_check-jython-script" level="info"/>
|
|
381 |
<au:assertLogContains text="found in check-script" level="info"/>
|
|
382 |
</target>
|
|
383 |
|
|
384 |
<target name="test-python-script-dump-task">
|
|
385 |
<pathconvert pathsep="${path.separator}" property="python.tools.path">
|
|
386 |
<fileset dir="./../../../../../nokia_builder" includes="tools/pylint/**/*.egg" />
|
|
387 |
<dirset dir="./../../../../../nokia_builder" includes="tools/pylint/**/*.egg" />
|
|
388 |
</pathconvert>
|
628
|
389 |
<au:expectfailure>
|
|
390 |
<hlm:antlint>
|
645
|
391 |
<fileset id="antlint.files" dir="${antlint.test.dir}/data">
|
|
392 |
<include name="*.xml"/>
|
|
393 |
<include name="*.ant.xml"/>
|
|
394 |
<include name="build.xml"/>
|
|
395 |
<include name="*.antlib.xml"/>
|
|
396 |
</fileset>
|
|
397 |
<hlm:pylintExecutor outputDir="${antlint.test.dir}/data/output/python" >
|
|
398 |
<env key="PYTHONPATH" value="${python.tools.path}"/>
|
|
399 |
<arg file="${antlint.test.dir}/data/config/pylint-script.py"/>
|
|
400 |
<arg value="--output-format=parseable"/>
|
|
401 |
<arg line="--rcfile=${antlint.test.dir}/data/config/pylintrc.txt"/>
|
|
402 |
</hlm:pylintExecutor>
|
628
|
403 |
</hlm:antlint>
|
|
404 |
</au:expectfailure>
|
645
|
405 |
<au:assertFileExists file="${antlint.test.dir}/data/output/python/python/target0_check-prop-in-pythontask.py"/>
|
|
406 |
<au:assertFileExists file="${antlint.test.dir}/data/output/python/python/target0_check-script-size.py"/>
|
|
407 |
<au:assertLogContains text="target0_check-prop-in-pythontask.py:3: [E0602, abc] Undefined variable 'abcd'" level="info"/>
|
628
|
408 |
</target>
|
645
|
409 |
|
587
|
410 |
</project>
|