]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | ################################################## |
2 | ### ### | |
3 | ### Makefile for LCLint testing ### | |
4 | ### ### | |
5 | ### designed for use with GNU make ### | |
6 | ### ### | |
7 | ################################################## | |
8 | ||
9 | .PHONY: all fulltest quicktest funcpointer cast abstract | |
10 | .PHONY: version help abstptr abstract alias alttypes ansireserved | |
11 | .PHONY: argorder args blocks break cases cast charlit | |
12 | .PHONY: clauses commentchar | |
13 | .PHONY: compdestroy controldepth csyntax czechnames czechoslovaknames | |
14 | .PHONY: decl enum exports external fields flags funcpointer glob globals | |
15 | .PHONY: impabstract init inparam internal iter keep libs lintcomments | |
16 | .PHONY: list macros macrosef merge modifies modtest moduncon mongoincludes | |
17 | .PHONY: null observer oldstyle outglob outparam preds prefixes printflike rc | |
18 | .PHONY: refcounts release repexpose sharing slovaknames special | |
19 | .PHONY: specclauses stack staticarray | |
20 | .PHONY: strings structassign | |
21 | .PHONY: typequals ud ulstypes union unreachable unused | |
cc78dedd | 22 | .PHONY: db1 db2 db3 tests2.2 tests2.2a tests2.4 tests2.5 |
885824d3 | 23 | .PHONY: all test fulltest expects quicktest |
e4c9f289 | 24 | .PHONY: sizeoftest |
01b933c3 | 25 | .PHONY: bufferTest |
26 | .PHONY: simplebufferConstraintTests | |
885824d3 | 27 | |
28 | .SUFFIXES: .out .expect .c .lcl .h .lh .diff | |
29 | ||
30 | SHELL = /bin/csh -f | |
31 | ||
32 | # Command to run lclint | |
cc78dedd | 33 | LCLINT = ${HOME}/lclint-dev/src/lclint |
885824d3 | 34 | LCLINTP = $(LCLINT) |
35 | ||
36 | # Make sure .lclintrc files are not used so test results do not | |
37 | # depend on local settings. | |
38 | LCLINTRN = $(LCLINTP) -nof -hints -booltype "bool" | |
39 | LCLINTR = $(LCLINTRN) -exportlocal | |
40 | ||
01b933c3 | 41 | UNITTESTS = help abstptr abstract alias alttypes ansireserved argorder args blocks break cases cast charlit clauses commentchar compdestroy controldepth csyntax czechnames czechoslovaknames decl enum exports external fields flags funcpointer glob globals impabstract init inparam internal iter keep libs lintcomments list macros macrosef merge modifies modtest moduncon mongoincludes null sizeoftest bufferTest simplebufferConstraintTests observer oldstyle outglob outparam preds prefixes printflike rc refcounts release repexpose sharing slovaknames specclauses special stack staticarray strings structassign typequals ud ulstypes union unreachable unused tests2.2 tests2.2a tests2.4 tests2.5 |
e4c9f289 | 42 | |
43 | #UNITTEST = bufferTest | |
885824d3 | 44 | |
45 | UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS)) | |
46 | ||
47 | INTEGTESTS = db1 db2 db3 | |
48 | INTEGEXPECTS = $(addsuffix .expect, $(INTEGTESTS)) | |
49 | ||
50 | LCLINTTESTS = $(UNITTESTS) $(INTEGTESTS) | |
51 | ||
52 | all: fulltest | |
53 | test: fulltest | |
54 | ||
55 | GREP = grep | |
56 | DIFF = diff | |
57 | CLEANOUTPUT = $(GREP) -v "LCLint 2." | $(GREP) -v "make -e" | $(GREP) -v "make\[" | $(GREP) -v "lclint -nof" | $(GREP) -v "make -e" | |
58 | ||
59 | ### not real .c | |
60 | ||
61 | .c.expect: | |
62 | $(MAKE) -e $(*) |& $(CLEANOUTPUT) > $(*).expect ; \ | |
63 | cat $(*).expect | |
64 | ||
65 | .c.diff: | |
66 | $(MAKE) -e $(*) |& $(CLEANOUTPUT) > $(*).out ; \ | |
67 | diff $(*).expect $(*).out | |
68 | ||
69 | expects: | |
70 | echo "Saving old expects: " ; \ | |
71 | more *.expect | cat > expects-`date +"%y-%m-%d-%H"` | |
72 | @$(foreach test, $(UNITTESTS), \ | |
73 | echo "Making "$(test)".expect: " ; \ | |
74 | $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).expect ; \ | |
75 | cat $(test).expect ; ) | |
76 | @echo "Integration Tests" | |
77 | @$(foreach test, $(INTEGTESTS), \ | |
78 | echo "Making "$(test)".expect: "; \ | |
79 | $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).expect ; \ | |
80 | cat $(test).expect ; ) | |
81 | ||
82 | fulltest: | |
83 | @echo '' | |
84 | @echo 'Testing '$(LCLINTP) | |
85 | @echo '' | |
86 | @echo 'Version:' | |
87 | @echo '' | |
88 | @$(LCLINTP) -help version | |
89 | @$(LCLINTP) -help vars | |
90 | @echo '' | |
91 | @echo "Unit Tests:" | |
92 | @echo '' | |
93 | @$(foreach test, $(UNITTESTS), \ | |
94 | echo "Checking "$(test)"... " ; \ | |
95 | $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).out ; \ | |
96 | $(DIFF) $(test).expect $(test).out ; \ | |
97 | if ($$status) echo "*** FAIL ***" ; \ | |
98 | ) | |
99 | @echo '' | |
100 | @echo "Integration Tests" | |
101 | @echo '' | |
102 | @$(foreach test, $(INTEGTESTS), \ | |
103 | echo "Checking "$(test)"... "; \ | |
104 | $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).out ; \ | |
105 | $(DIFF) $(test).expect $(test).out ; ) | |
106 | ||
107 | quicktest: $(LCLINTTESTS) | |
108 | ||
109 | ### | |
110 | ### Unit Tests | |
111 | ### | |
112 | ||
113 | version: | |
114 | -$(LCLINTP) -help version | |
115 | ||
116 | help: | |
117 | -@$(LCLINTP) | |
118 | -@setenv LARCH_PATH "/dev/null"; $(LCLINTP) empty.lcl | |
119 | -@$(LCLINTP) -help | |
120 | -@$(LCLINTP) -asdf | |
121 | -@$(LCLINTP) +boolint +boolint | |
122 | -@$(LCLINTP) -help flags alpha | |
123 | -@$(LCLINTP) -help flags all | |
124 | ||
125 | abstptr: | |
126 | $(LCLINTR) abstptr -expect 9 | |
127 | $(LCLINTR) abstptr +voidabstract -expect 6 | |
128 | ||
129 | abstract: | |
130 | $(LCLINTR) abst_t.lcl commentcmd.c -expect 15 | |
131 | ||
132 | alias: | |
133 | $(LCLINTR) +lh mut | |
134 | $(LCLINTR) mut alias +globalias -expect 19 | |
135 | $(LCLINTR) mut alias2 +globalias -expect 17 | |
136 | $(LCLINTR) +lh alias3 -expect 14 | |
137 | $(LCLINTR) +lh alias4 +boolint | |
138 | $(LCLINTR) alias4 -pred +retalias -expect 6 | |
139 | $(LCLINTR) +lh alias5 +memchecks -null -specundef -expect 5 | |
140 | ||
141 | alttypes: | |
142 | $(LCLINTR) alttypes.c -expect 2 | |
143 | ||
144 | ansireserved: | |
145 | $(LCLINTR) ansireserved.c +ansireserved -nolib -expect 8 | |
146 | $(LCLINTR) ansireserved.c +ansireserved +ansireservedlocal -nolib -expect 11 | |
147 | $(LCLINTRN) ansireserved.c +checks -exportlocal -exportheadervar -exportheader -expect 9 | |
148 | ||
149 | argorder: | |
150 | $(LCLINTR) argorder.c -expect 4 | |
151 | $(LCLINTR) argorder2 -expect 5 | |
152 | $(LCLINTR) argorder3.c -expect 8 | |
153 | $(LCLINTR) argorder4 -expect 9 | |
154 | $(LCLINTR) argorder4 -evalorder -expect 1 | |
155 | $(LCLINTR) argorder5.c +evalorderuncon -expect 3 | |
156 | ||
157 | args: | |
158 | $(LCLINTR) args -noeffect -expect 12 | |
159 | ||
160 | blocks: | |
161 | $(LCLINTR) blocks.c -expect 4 | |
162 | $(LCLINTR) blocks.c +ifblock +elseifcomplete -expect 7 | |
163 | $(LCLINTR) blocks.c -ifempty +whileempty +whileblock -expect 3 | |
164 | $(LCLINTR) blocks.c -ifempty +forempty +forblock -expect 3 | |
165 | $(LCLINTR) blocks.c +allempty -expect 6 | |
166 | $(LCLINTRN) blocks.c +strict -exportlocal +partial -exportheader -expect 11 | |
167 | ||
168 | break: | |
169 | $(LCLINTR) break.c -expect 4 | |
170 | $(LCLINTR) break.c +deepbreak -expect 6 | |
171 | $(LCLINTR) break.c +deepbreak -looploopbreak -expect 5 | |
172 | ||
173 | cases: | |
174 | $(LCLINTR) cases.c -expect 5 | |
175 | $(LCLINTR) cases2.c -expect 2 | |
176 | $(LCLINTRN) cases2.c +checks -exportlocal -exportheader -expect 3 | |
177 | $(LCLINTRN) cases2.c +checks -exportlocal -exportheader -branchstate -expect 3 | |
178 | ||
179 | cast: | |
180 | $(LCLINTR) cast -accessmodule -expect 20 | |
181 | $(LCLINTRN) cast2.c +checks -exportlocal -exportheader -expect 3 | |
182 | ||
cc78dedd | 183 | ### Two addition errors detected with 2.5 with -numliteral. |
184 | ||
885824d3 | 185 | charlit: |
186 | $(LCLINTR) +hints charlit.c -expect 4 | |
cc78dedd | 187 | $(LCLINTR) +hints -numliteral charlit.c -expect 6 |
885824d3 | 188 | $(LCLINTR) +hints charlit.c +charintliteral +ignoresigns |
189 | ||
190 | clauses: | |
191 | $(LCLINTR) clauses.c +memchecks -expect 4 | |
192 | $(LCLINTR) clauses2.c +memchecks | |
193 | $(LCLINTR) clauses3.c +memchecks -expect 2 | |
194 | $(LCLINTR) clauses3.c +memchecks +unixlib -expect 3 | |
195 | ||
196 | commentchar: | |
197 | $(LCLINTR) commentchar.c -expect 4 | |
198 | $(LCLINTR) -commentchar '#' commentchar.c -expect 4 | |
199 | ||
200 | controldepth: | |
201 | $(LCLINTR) +hints -controlnestdepth 2 controldepth.c -expect 2 | |
202 | $(LCLINTR) +hints -controlnestdepth 1 controldepth.c -expect 2 | |
203 | ||
204 | compdestroy: | |
205 | $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader -expect 1 | |
206 | $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy -expect 2 | |
207 | $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy +strictusereleased -expect 3 | |
208 | $(LCLINTRN) compdestroy.c +strict +partial -exportheader -expect 3 | |
209 | ||
210 | csyntax: | |
cc78dedd | 211 | $(LCLINTR) +quiet -incondefs csyntax.c -expect 1 |
212 | $(LCLINTR) +quiet csyntax2.c -expect 2 | |
213 | $(LCLINTR) +quiet csyntax3.c -expect 1 | |
885824d3 | 214 | $(LCLINTR) +quiet -incondefs csyntax4.c |
215 | $(LCLINTR) +quiet csyntax5.c | |
216 | $(LCLINTR) +quiet csyntax6.c | |
217 | $(LCLINTR) +quiet csyntax7.c | |
218 | $(LCLINTR) +quiet csyntax8.c | |
219 | $(LCLINTR) +quiet csyntax9.c | |
220 | $(LCLINTR) +quiet csyntax10.c | |
221 | $(LCLINTR) +quiet csyntax11.c | |
222 | $(LCLINTR) +quiet csyntax12.c | |
cc78dedd | 223 | $(LCLINTR) +quiet csyntax13.c -expect 1 |
885824d3 | 224 | $(LCLINTR) +quiet csyntax14.c |
225 | $(LCLINTR) +quiet csyntax15.c | |
cc78dedd | 226 | $(LCLINTR) +quiet csyntax16.c -expect 2 |
227 | $(LCLINTR) +quiet csyntax17.c -expect 3 | |
885824d3 | 228 | |
229 | czechnames: | |
230 | $(LCLINTR) czechnames.c | |
231 | $(LCLINTR) +hints +czech czechnames.c -expect 2 | |
232 | $(LCLINTR) +hints +czech -czechvars czechnames.c -expect 1 | |
233 | $(LCLINTR) +hints +czech -accessczech czechnames.c -expect 6 | |
234 | ||
235 | czechoslovaknames: | |
236 | $(LCLINTR) +hints +czechoslovak czechnames.c -expect 1 | |
237 | $(LCLINTR) +hints +czechoslovak slovaknames.c -expect 1 | |
238 | $(LCLINTR) +hints +czechoslovak +slovakvars slovaknames.c -expect 2 | |
239 | ||
240 | # | |
241 | # Was expect 3 before 2.4. Earlier versions did not handle implicit | |
242 | # function pointers correctly. | |
243 | # | |
244 | ||
245 | decl: | |
246 | $(LCLINTR) decl.c -expect 2 | |
247 | $(LCLINTRN) decl.c +strict -exportlocal -expect 5 | |
248 | $(LCLINTR) decl2 -expect 4 | |
249 | ||
250 | enum: | |
251 | $(LCLINTR) enum -expect 16 | |
252 | $(LCLINTR) enum -misscase -expect 14 | |
253 | ||
254 | exports: | |
255 | $(LCLINTR) exports.c +exporttype +exportvar +exportfcn +topuse +typeuse -expect 6 | |
256 | $(LCLINTR) exports.c +exportany -expect 3 | |
257 | $(LCLINTR) exports.c | |
258 | ||
259 | external: | |
260 | $(LCLINTR) external.c +partial | |
261 | $(LCLINTR) external.c +partial +distinctexternalnames -expect 2 | |
262 | $(LCLINTR) external.c -nolib +partial -externalnamelength 3 -expect 3 | |
263 | $(LCLINTR) external.c -nolib +partial -externalnamelength 3 +externalnamecaseinsensitive -expect 3 | |
264 | $(LCLINTR) external.c +partial -externalnamelength 3 -expect 4 | |
265 | ||
266 | fields: | |
267 | $(LCLINTR) fields.c +memchecks -expect 6 | |
268 | $(LCLINTR) fields2.c +memchecks -expect 5 | |
269 | $(LCLINTR) fields3.c +memchecks | |
270 | ||
271 | flags: | |
272 | $(LCLINTR) flags.c -expect 8 | |
273 | $(LCLINTR) +nocomments flags.c -expect 2 | |
274 | ||
275 | # two new errors (invalid lhs) | |
276 | ||
277 | funcpointer: | |
278 | $(LCLINTR) +memchecks +noparams funcpointer.c -expect 18 | |
279 | ||
280 | glob: | |
281 | $(LCLINTR) glob -expect 4 | |
282 | $(LCLINTR) glob -globuse -expect 3 | |
283 | $(LCLINTR) glob +globunspec -expect 6 | |
284 | ||
285 | globals: | |
286 | $(LCLINTR) -modifies globals.c -expect 5 | |
287 | $(LCLINTR) -modifies globals.c +allglobals -expect 6 | |
288 | $(LCLINTR) -modifies globals.c +impcheckedglobals -expect 6 | |
289 | $(LCLINTR) -modifies globals.c -globals -checkstrictglobals -expect 2 | |
290 | $(LCLINTR) -modifies globals.c +globunspec -expect 6 | |
291 | $(LCLINTR) -modifies globals.c +globunspec +allglobals -expect 8 | |
292 | ||
293 | impabstract: | |
294 | $(LCLINTR) -accessfile impabstract.c | |
295 | $(LCLINTR) -accessfile +hints +impabstract impabstract.c -expect 2 | |
296 | $(LCLINTR) -accessfile +hints +impabstract impabstract -expect 2 | |
297 | ||
298 | init: | |
299 | $(LCLINTR) init.c -expect 12 | |
300 | $(LCLINTRN) init.c +checks -exportlocal -exportheadervar -expect 15 | |
301 | ||
302 | inparam: | |
303 | $(LCLINTR) inparam.c -expect 2 | |
304 | $(LCLINTR) +impouts inparam.c -expect 1 | |
305 | ||
306 | internal: | |
307 | $(LCLINTR) internal.c -expect 1 | |
308 | $(LCLINTR) internal.c +distinctinternalnames -expect 2 | |
309 | $(LCLINTR) internal.c -internalnamelen 28 -expect 3 | |
310 | $(LCLINTR) internal.c +internalnamecaseinsensitive -expect 3 | |
311 | $(LCLINTR) internal.c +internalnamecaseinsensitive +internalnamelookalike -expect 11 | |
312 | ||
313 | iter: | |
314 | $(LCLINTR) iter -expect 14 -lclexpect 1 | |
315 | $(LCLINTR) iter2.c -expect 12 | |
316 | ||
317 | keep: | |
318 | $(LCLINTR) keep.c +memchecks -expect 6 | |
319 | ||
320 | # | |
321 | # 2 new errors found (fixed spec of signal) | |
322 | # | |
323 | ||
324 | libs: | |
325 | $(LCLINTR) libs.c +longunsignedunsignedintegral -expect 15 | |
326 | $(LCLINTR) libs.c -expect 19 | |
327 | $(LCLINTR) libs.c +globunspec +modunspec -expect 22 | |
328 | $(LCLINTR) libs.c +strictlib +globunspec +modunspec -expect 39 | |
329 | ||
330 | lintcomments: | |
331 | $(LCLINTR) lintcomments.c -expect 4 | |
332 | $(LCLINTR) lintcomments.c -warnlintcomments -expect 1 | |
333 | $(LCLINTR) lintcomments.c -lintcomments -expect 4 | |
334 | ||
335 | list: | |
336 | $(LCLINTR) list.c -expect 3 | |
337 | ||
338 | macros: | |
339 | $(LCLINTR) macros -expect 17 | |
340 | $(LCLINTR) macros.c +allmacros -expect 34 | |
341 | $(LCLINTR) macros.c +fcnmacros -expect 31 | |
342 | ||
343 | ||
344 | macrosef: | |
345 | $(LCLINTR) macrosef -expect 4 | |
346 | $(LCLINTR) macrosef.c +allmacros -expect 3 | |
347 | $(LCLINTR) macrosef.c +allmacros +sefuncon -expect 4 | |
348 | ||
349 | merge: | |
350 | $(LCLINTRN) merge.c +checks -exportlocal -exportheadervar -exportheader -expect 3 | |
351 | ||
352 | modifies: | |
353 | $(LCLINTR) modifies.c modclient.c +impcheckedstatics +mustmod -expect 7 | |
354 | ||
355 | modtest: | |
356 | $(LCLINTR) modtest -expect 10 | |
357 | $(LCLINTR) modtest +modunspec -expect 13 | |
358 | $(LCLINTR) modtest +mustmod -expect 14 | |
359 | ||
360 | moduncon: | |
361 | $(LCLINTR) moduncon.c +moduncon -memchecks -expect 4 | |
362 | $(LCLINTRN) moduncon.c +strict -exportlocal -expect 22 | |
363 | ||
364 | mongoincludes: | |
365 | $(LCLINTR) mongoincludes.c -includenest 1 -expect 19 | |
366 | $(LCLINTR) mongoincludes.c -includenest 2 -expect 10 | |
367 | $(LCLINTR) mongoincludes.c -includenest 3 -expect 4 | |
368 | $(LCLINTR) mongoincludes.c -includenest 4 -expect 1 | |
369 | $(LCLINTR) mongoincludes.c -includenest 5 -expect 0 | |
370 | ||
371 | null: | |
372 | $(LCLINTR) null1.c -expect 14 | |
373 | $(LCLINTR) null1.c -null -expect 4 | |
374 | $(LCLINTR) null2.c -expect 10 | |
375 | $(LCLINTR) null3.c -expect 15 | |
376 | $(LCLINTR) null3.c -warnunixlib +unixlib -expect 16 | |
377 | $(LCLINTR) null4.c -expect 1 | |
378 | $(LCLINTR) null5.c -expect 4 | |
379 | $(LCLINTR) null6 -expect 4 | |
380 | $(LCLINTR) +quiet null6.lcl -dump null6 | |
381 | $(LCLINTR) null6.c -load null6 -expect 4 | |
382 | ||
383 | # | |
384 | # Before 2.4, expected one more because error was reported both as | |
385 | # dependent and observer. | |
386 | # | |
387 | ||
388 | observer: | |
389 | $(LCLINTRN) observer +checks -exportlocal -exportheader -expect 9 | |
390 | $(LCLINTRN) observer.c +checks -exportlocal -exportheader -expect 8 | |
391 | $(LCLINTR) observer.c -expect 7 | |
392 | ||
393 | oldstyle: | |
394 | $(LCLINTR) oldstyle -expect 3 | |
395 | ||
396 | outglob: | |
397 | $(LCLINTR) outglob -expect 10 | |
398 | ||
399 | outparam: | |
400 | $(LCLINTR) outparam -expect 12 | |
401 | ||
402 | preds: | |
403 | $(LCLINTR) +hints preds.c -expect 6 | |
404 | $(LCLINTRN) +hints preds.c -weak -expect 1 | |
405 | $(LCLINTRN) +hints preds.c -strict -exportlocal -exportheader -expect 8 | |
406 | ||
407 | prefixes: | |
408 | $(LCLINTR) prefixes.c +partial | |
409 | $(LCLINTRN) prefixes.c +allmacros +checks -exportlocal +partial -exportheader -exportheadervar -expect 4 | |
410 | $(LCLINTR) prefixes.c -typeprefix "T" -expect 2 | |
411 | $(LCLINTR) prefixes.c -typeprefix "^" -expect 1 | |
412 | $(LCLINTR) prefixes.c -typeprefix "^*" -expect 2 | |
413 | $(LCLINTR) prefixes.c -typeprefix "^%*" -expect 2 | |
414 | $(LCLINTR) prefixes.c -typeprefix "^~*" -expect 2 | |
415 | $(LCLINTR) prefixes.c -typeprefix "^" +typeprefixexclude -expect 7 | |
416 | $(LCLINTR) prefixes.c -filestaticprefix "^^" -expect 4 | |
417 | $(LCLINTR) prefixes.c -filestaticprefix "^#" -expect 5 | |
418 | $(LCLINTR) prefixes.c -filestaticprefix "^?&x" -expect 5 | |
419 | $(LCLINTR) prefixes.c -globalprefix "G" -expect 1 | |
420 | $(LCLINTR) prefixes.c -globalprefix "&G?_^" -expect 1 | |
421 | $(LCLINTR) prefixes.c -externalprefix "G" -expect 5 | |
422 | $(LCLINTR) prefixes.c -typeprefix "T" -externalprefix "G" -expect 4 | |
423 | $(LCLINTR) prefixes.c -localprefix "?*" +localprefixexclude -expect 13 | |
424 | ||
425 | printflike: | |
426 | $(LCLINTR) printflike.c -expect 6 | |
427 | $(LCLINTR) printflike.c -warnlintcomments -expect 5 | |
428 | ||
429 | rc: | |
cc78dedd | 430 | $(LCLINTR) -DMYSTERY='"a flag\"wicked cool"' rc.c -expect 1 |
431 | $(LCLINTR) -DMYSTERY=12 rc.c -expect 1 | |
432 | $(LCLINTR) -f rc1.lclintrc rc.c -expect 1 | |
433 | $(LCLINTR) -UMYSTERY -f rc1.lclintrc rc.c -expect 1 | |
434 | $(LCLINTR) -f rc3.lclintrc rc.c -expect 1 | |
885824d3 | 435 | |
436 | refcounts: | |
437 | $(LCLINTR) refcounts.c -expect 7 | |
438 | ||
439 | release: | |
440 | $(LCLINTR) release.c +memchecks -expect 1 | |
441 | ||
442 | repexpose: | |
443 | $(LCLINTR) +lh repexpose +memchecks -expect 12 | |
444 | $(LCLINTR) repexpose +memchecks +retalias -expect 15 | |
445 | $(LCLINTRN) repexpose +checks -exportlocal -expect 27 | |
446 | ||
447 | sharing: | |
448 | $(LCLINTR) sharing1.c -expect 21 | |
449 | $(LCLINTR) sharing3.c -expect 3 | |
450 | $(LCLINTR) sharing4.c -expect 13 | |
451 | $(LCLINTR) sharing4.c -paramimptemp -expect 12 | |
452 | $(LCLINTR) sharing5.c -expect 6 | |
453 | ||
454 | slovaknames: | |
455 | $(LCLINTR) +hints slovaknames.c -expect 1 | |
456 | $(LCLINTR) +hints slovaknames.c +accessslovak | |
457 | $(LCLINTR) +hints +slovak slovaknames.c -expect 3 | |
458 | $(LCLINTR) +hints +slovak -slovakvars slovaknames.c -expect 2 | |
459 | $(LCLINTR) +hints +slovak -accessslovak slovaknames.c -expect 7 | |
460 | ||
461 | specclauses: | |
462 | $(LCLINTR) specclauses.c -expect 6 | |
463 | $(LCLINTR) specclauses2.c -expect 8 | |
464 | $(LCLINTR) specclauses3.c -expect 6 | |
465 | $(LCLINTR) specclauses4.c -expect 3 | |
466 | $(LCLINTR) specclauses5.c -expect 3 | |
467 | ||
468 | special: | |
469 | $(LCLINTR) special -expect 20 | |
470 | $(LCLINTR) special -relaxquals -expect 22 | |
471 | ||
472 | stack: | |
473 | $(LCLINTR) stack.c -expect 5 | |
474 | $(LCLINTR) stack.c -stackref | |
475 | ||
476 | staticarray: | |
477 | $(LCLINTR) staticarray.c -expect 3 | |
478 | ||
479 | strings: | |
480 | $(LCLINTR) strings.c -expect 3 | |
481 | $(LCLINTR) -readonlystrings -expect 1 strings.c | |
482 | $(LCLINTR) +modobserverstrict -maintype -expect 4 strings.c | |
483 | ||
484 | structassign: | |
485 | $(LCLINTR) structassign.c -expect 4 | |
486 | ||
487 | typequals: | |
488 | $(LCLINTR) typequals.c tq.lcl -expect 5 | |
489 | $(LCLINTR) typequals.c -expect 2 | |
490 | ||
491 | ud: | |
492 | $(LCLINTR) ud.c -expect 9 | |
493 | $(LCLINTR) ud2 -specundef -expect 3 | |
494 | ||
495 | ulstypes: | |
496 | $(LCLINTR) ulstypes.c -expect 8 | |
497 | $(LCLINTR) ulstypes.c +ignorequals | |
498 | $(LCLINTRN) ulstypes.c +strict -exportheader -exportheadervar -expect 28 | |
cc78dedd | 499 | # 3 more detected with version 2.5 (change in -numliteral setting) |
885824d3 | 500 | |
501 | union: | |
502 | $(LCLINTR) +memchecks union.c -expect 8 | |
503 | ||
504 | unreachable: | |
505 | $(LCLINTR) unreachable.c -expect 5 | |
506 | $(LCLINTR) -unreachable unreachable.c -expect 2 | |
507 | $(LCLINTR) switch.c -expect 4 | |
508 | ||
509 | unused: | |
510 | $(LCLINTRN) unused.c +checks -exportlocal -expect 3 | |
511 | $(LCLINTRN) unused.c +checks -exportlocal +topuse -expect 6 | |
512 | ||
513 | ### | |
514 | ### Bugs fixed and new features since version 2.1b | |
515 | ### | |
516 | ||
517 | tests2.2: | |
518 | @cd tests2.2 ; \ | |
519 | $(LCLINTR) boolops.c -expect 1 ; \ | |
520 | $(LCLINTR) bool.lcl booldef.c -expect 1 ; \ | |
521 | $(LCLINTR) boolenum.c -booltype BOOLEAN -expect 1 ; \ | |
522 | $(LCLINTR) break.c -expect 1 ; \ | |
523 | $(LCLINTR) bstring.c -expect 2 ; \ | |
524 | $(LCLINTR) decl.c -expect 1 ; \ | |
525 | $(LCLINTR) enumbool.c -expect 2 ; \ | |
526 | $(LCLINTR) enumbool.c -booltrue "true" -boolfalse "false" ; \ | |
527 | $(LCLINTR) extension.c ; \ | |
528 | $(LCLINTR) -gnuextensions extension.c ; \ | |
529 | $(LCLINTR) modarray.c ; \ | |
530 | $(LCLINTR) nestext.c -expect 1 ; \ | |
531 | $(LCLINTR) offsetof.c ; \ | |
532 | $(LCLINTR) sizeofarray.c -expect 3 ; \ | |
533 | $(LCLINTR) rex.c -expect 1 ; \ | |
534 | $(LCLINTR) struct.c -expect 1 | |
535 | ||
536 | tests2.2a: | |
537 | @cd tests2.2a ; \ | |
538 | $(LCLINTR) erik.c -expect 1 ; \ | |
539 | $(LCLINTR) boolcomp.c -expect 5 ; \ | |
540 | $(LCLINTR) boolenum.c ; \ | |
541 | $(LCLINTR) addassign.c -expect 1; \ | |
542 | $(LCLINTR) toralf.c -expect 5 ; \ | |
543 | $(LCLINTR) fred.c -booltype Bool ; \ | |
544 | $(LCLINTR) sizeof.c ; \ | |
545 | $(LCLINTR) arrayparam.c -expect 5 ; \ | |
546 | $(LCLINTR) notreached.c ; \ | |
cc78dedd | 547 | $(LCLINTR) duff.c -casebreak -firstcase ; \ |
885824d3 | 548 | $(LCLINTR) obviousloop.c -expect 4 ; \ |
549 | $(LCLINTR) bitops.c +bitwisesigned -expect 11 ; \ | |
550 | $(LCLINTR) bitops.c -expect 5 ; \ | |
551 | $(LCLINTR) isalpha.c +strictlib -expect 1 ; \ | |
552 | $(LCLINTR) isalpha.c -expect 1 ; \ | |
553 | $(LCLINTR) dobb.c ; \ | |
554 | $(LCLINTR) popik.c -expect 11 | |
555 | ||
556 | tests2.4: | |
557 | @cd tests2.4 ; \ | |
558 | $(LCLINTR) emptycase.c ; \ | |
559 | $(LCLINTR) enumtest.c ; \ | |
560 | $(LCLINTR) duffs.c ; \ | |
561 | $(LCLINTR) bitfields.c ; \ | |
562 | $(LCLINTR) bug1.c ; \ | |
563 | $(LCLINTR) bug2.c -expect 5 ; \ | |
564 | $(LCLINTR) bug3.c ; \ | |
565 | $(LCLINTR) test0.c ; \ | |
566 | $(LCLINTR) test1.c ; \ | |
567 | $(LCLINTR) test2.c ; \ | |
568 | $(LCLINTR) hexconstants.c -expect 1 ; \ | |
569 | $(LCLINTR) +checks hexconstants.c -expect 4 ; \ | |
570 | $(LCLINTR) innercomment.c ; \ | |
571 | $(LCLINTR) nothing.c ; \ | |
572 | $(LCLINTR) offsetof.c -expect 2 ; \ | |
573 | $(LCLINTR) komazi.c ; \ | |
574 | $(LCLINTR) print.c ; \ | |
575 | $(LCLINTR) syslog.c -warnunixlib +unixlib ; \ | |
576 | $(LCLINTR) error.c -expect 1 ; \ | |
577 | $(LCLINTR) ulrich.c ; \ | |
578 | $(LCLINTR) cpptest.c '-D__P(x)=x' ; \ | |
579 | $(LCLINTR) longlong.c -expect 4; \ | |
580 | $(LCLINTR) subdir/main.c subdir/main.lcl ; \ | |
581 | $(LCLINTR) fink.c ; \ | |
582 | $(LCLINTR) driverstub.c ; \ | |
583 | $(LCLINTR) alignof.c -expect 2 ; \ | |
584 | $(LCLINTR) -D DBL_MANT_DIG=25 source.c | |
585 | ||
e4c9f289 | 586 | sizeoftest: |
587 | @cd sizeoftest; \ | |
588 | $(LCLINTR) +functionconstraint sizeof.c | |
1ac6313d | 589 | |
01b933c3 | 590 | bufferTest: |
591 | @cd bufferTest; \ | |
592 | $(LCLINTR) +functionconstraint test4.c test6.c | |
593 | ||
594 | simplebufferConstraintTests: | |
595 | @cd simplebufferConstraintTests; \ | |
596 | $(LCLINTR) +functionconstraint m.c sizeof.c test3.c test7.c | |
597 | ||
cc78dedd | 598 | tests2.5: |
599 | setenv LCLINT '$(LCLINTRN)'; cd tests2.5 ; $(MAKE) -e | |
600 | ||
885824d3 | 601 | ### |
602 | ### Integration Tests | |
603 | ### | |
604 | ||
605 | db1: | |
606 | setenv LCLINT '$(LCLINTRN)'; cd db1; $(MAKE) -e test | |
607 | ||
608 | db2: | |
609 | setenv LCLINT '$(LCLINTRN)'; cd db2; $(MAKE) -e test | |
610 | ||
611 | db3: | |
612 | setenv LCLINT '$(LCLINTRN)'; cd db3; $(MAKE) -e test | |
613 | ||
885824d3 | 614 | clean: |
615 | -rm -f *~ #*# *.o *.lcs a.out | |
616 | -cd db1 ; $(MAKE) clean | |
617 | -cd db2 ; $(MAKE) clean | |
618 | -cd db3 ; $(MAKE) clean | |
619 | ||
620 | ||
621 | ||
cc78dedd | 622 |