]> andersk Git - splint.git/blob - test/Makefile.am
Updated build to use automake files created by Tim Van Holder.
[splint.git] / test / Makefile.am
1 ## This file currently uses GNU Make features; those should really be replaced
2 ## by configure-time handling.
3
4 AUTOMAKE_OPTIONS = 1.5 foreign
5
6 ## Use this to configure diff output
7 DIFFFLAGS = -u
8
9 ## Set up the lclint commands
10
11 LCLINT    = $(top_builddir)/bin/lclint$(EXEEXT)
12 LCLINTP   = @$(LCLINT)
13
14 # Make sure .lclintrc files are not used so test results do not
15 # depend on local settings.
16 LCLINTRN  = $(LCLINTP) -nof -hints -booltype "bool"
17 LCLINTR   = $(LCLINTRN) -exportlocal +debugfcnconstraint
18
19 ## Currently disabled tests:
20 ##  fileio tainted mergestate nullret nullassign warnuse metastate \
21 ##  nullret nullassign warnuse
22
23 ###
24 ### !!! 
25 ### These tests have been temporarily removed because of problems with the new build process:
26 ###   fileio tainted mergestate metastate help sizeoftest bufferTest \
27 ###   tests2.2 tests2.2a tests2.4 tests2.5 
28 ###   simplebufferConstraintTests moreBufferTests globalbufferannotation \
29 ###   maxset strchr for
30
31 UNITTESTS = \
32   abstptr abstract alias alttypes ansireserved argorder \
33   args blocks break cases cast charlit clauses commentchar compdestroy \
34   constannot controldepth csyntax czechnames czechoslovaknames deadparam \
35   decl enum exports external fields flags forbody format freearray \
36   funcpointer glob globals impabstract init inparam internal iter keep libs \
37   linked lintcomments list macros macrosef merge modifies modtest moduncon \
38   mongoincludes mystrncat noeffect null observer oldstyle outglob outparam \
39   postnotnull preds prefixes printflike rc refcounts release repexpose \
40   returned sharing slovaknames specclauses special stack staticarray strings \
41   structassign typequals ud ulstypes union unreachable unsignedcompare \
42   unused ullint void
43 UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS))
44
45 INTEGTESTS = db1 db2 db3
46 INTEGEXPECTS = $(addsuffix .expect, $(INTEGTESTS))
47
48 LCLINTTESTS = $(UNITTESTS) $(INTEGTESTS)
49
50 QUICKTESTS = db3
51
52 .PHONY: all check
53 all check: fulltest
54
55 .PHONY: version
56 version:
57         -$(LCLINTP) -help version
58
59 .PHONY: help
60 help:
61         -@$(LCLINTP)
62         -@LARCH_PATH=/dev/null $(LCLINTP) empty.lcl
63         -@$(LCLINTP) -help
64         -@$(LCLINTP) -asdf
65         -@$(LCLINTP) +boolint +boolint 
66         -@$(LCLINTP) -help flags alpha
67         -@$(LCLINTP) -help flags all
68
69 .PHONY: clean-local
70 clean-local:
71         -rm -f *~ #*# *.o *.lcs a.out
72         -cd db1; $(MAKE) clean
73         -cd db2; $(MAKE) clean
74         -cd db3; $(MAKE) clean
75
76 ## All tests need lclint to be built
77
78 $(LCLINTTESTS): $(LCLINT)
79
80 $(LCLINT):
81         cd $(top_builddir)/src; $(MAKE)
82
83 ## This is a kludgey way of processing the output to make it match exactly
84 ## The last matcher is the most annoying, as it can differ (the first two are
85 ##  pretty much fixed); usually, you'll have 'make[1]:', but on DOS it is
86 ##  'make.exe[1]:' (it might even be 'c:/path/to/make.exe[1]:', but that's
87 ##  not supported).
88 ## The tests should really be re-done as shell-scripts or something... maybe
89 ##  autotest could be used once it's finished.
90 CLEANOUTPUT = $(GREP) -v "LCLint 3." | $(GREP) -v "$(LCLINT)" | $(GREP) -v "^make.*\[[1-9]*\]:"
91
92 ## Not real C code
93
94 .c.expect:
95         $(MAKE) $* |& $(CLEANOUTPUT) >$*.expect && cat $*.expect
96
97 .c.diff:
98         $(MAKE) $* |& $(CLEANOUTPUT) >$*.out && diff $*.expect $*.out
99
100 .PHONY: expects
101 expects:
102         @echo "Saving old expects..."; \
103          cat *.expect >expects-`date +"%y-%m-%d-%H"`
104         @for TEST in $(UNITTESTS) $(INTEGTESTS); do \
105            echo "Making $$TEST.expect..."; \
106            $(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.expect; \
107            cat $$TEST.expect; \
108          done
109
110 .PHONY: quicktest
111 quicktest:
112         @for TEST in $(QUICKTESTS); do \
113            echo "Checking $$TEST..."; \
114            $(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.out && \
115              $(DIFF) $(DIFFFLAGS) $$TEST.expect $$TEST.out || \
116                echo "*** FAIL ***"; \
117          done
118
119 .PHONY: fulltest
120 fulltest:
121         @echo "Testing $(PACKAGE) $(VERSION)..."
122         @echo
123         @echo "Version Info:"
124         @$(LCLINTP) -help version
125         @$(LCLINTP) -help vars
126         @echo ""
127         @echo "Unit tests:"
128         @echo ""
129         @for TEST in $(UNITTESTS); do \
130            echo "Checking $$TEST..."; \
131            $(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.out && \
132              $(DIFF) $(DIFFFLAGS) $$TEST.expect $$TEST.out || \
133                echo "*** FAIL ***"; \
134          done
135
136 #!!!!
137 #       @echo ""
138 #       @echo "Integration tests:"
139 #       @echo ""
140 #       @for TEST in $(INTEGTESTS); do \
141 #          echo "Checking $$TEST..."; \
142 #          $(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.out && \
143 #            $(DIFF) $(DIFFFLAGS) $$TEST.expect $$TEST.out || \
144 #               echo "*** FAIL ***"; \
145 #        done
146
147 ## Rules for tests start here
148
149 SUBDIRTESTS = metastate mergestate tainted fileio warnuse ensuresclauses
150
151 .PHONY: abstptr
152 abstptr:
153         $(LCLINTR) abstptr -expect 9
154         $(LCLINTR) abstptr +voidabstract -expect 6
155
156 .PHONY: abstract
157 abstract:
158         $(LCLINTR) abst_t.lcl commentcmd.c -expect 15
159
160 .PHONY: alias
161 alias:
162         $(LCLINTR) +lh mut
163         $(LCLINTR) mut alias +globalias -expect 19
164         $(LCLINTR) mut alias2 +globalias -expect 17
165         $(LCLINTR) +lh alias3 -expect 14 
166         $(LCLINTR) +lh alias4 +boolint
167         $(LCLINTR) alias4 -pred +retalias -expect 6
168         $(LCLINTR) +lh alias5 +memchecks -null -specundef -expect 5
169
170 .PHONY: alttypes
171 alttypes:
172         $(LCLINTR) alttypes.c -expect 2
173
174 ###
175 ### evans 2001-06-07 - updated nameCheck.c to reflect C9X.
176 ### Reports one new errors for ansireserved.c - wctomb is bad even as a local
177 ###    variable (could be a macro?)
178 ### Reports 3 additional errors for +checks; no longer suppresses name errors
179 ###    in the presense of other errors.
180 ###
181
182 .PHONY: ansireserved
183 ansireserved:
184         $(LCLINTR) ansireserved.c +ansireserved -nolib -expect 9
185         $(LCLINTR) ansireserved.c +ansireserved +ansireservedlocal -nolib -expect 11
186         $(LCLINTRN) ansireserved.c +checks -exportlocal -exportheadervar -exportheader -expect 12
187         $(LCLINTR) ansireserved2.c +ansireserved -expect 1
188
189 .PHONY: argorder
190 argorder:
191         $(LCLINTR) argorder.c -expect 4
192         $(LCLINTR) argorder2  -expect 5
193         $(LCLINTR) argorder3.c -expect 8
194         $(LCLINTR) argorder4 -expect 9
195         $(LCLINTR) argorder4 -evalorder -expect 1
196         $(LCLINTR) argorder5.c +evalorderuncon -expect 3
197
198 .PHONY: args
199 args:
200         $(LCLINTR) args -noeffect -expect 12
201
202 .PHONY: blocks
203 blocks:
204         $(LCLINTR) blocks.c -expect 4
205         $(LCLINTR) blocks.c +ifblock +elseifcomplete -expect 7
206         $(LCLINTR) blocks.c -ifempty +whileempty +whileblock -expect 3
207         $(LCLINTR) blocks.c -ifempty +forempty +forblock -expect 3
208         $(LCLINTR) blocks.c +allempty -expect 6
209         $(LCLINTRN) blocks.c +strict -exportlocal +partial -exportheader -expect 11
210
211 .PHONY: break
212 break:
213         $(LCLINTR) break.c -expect 4
214         $(LCLINTR) break.c +deepbreak -expect 6
215         $(LCLINTR) break.c +deepbreak -looploopbreak -expect 5
216
217 .PHONY: cases
218 cases: 
219         $(LCLINTR) cases.c -expect 5
220         $(LCLINTR) cases2.c -expect 2
221         $(LCLINTRN) cases2.c +checks -exportlocal -exportheader -expect 3
222         $(LCLINTRN) cases2.c +checks -exportlocal -exportheader -branchstate -expect 3
223
224 .PHONY: cast
225 cast:
226         $(LCLINTR) cast -accessmodule -expect 20
227         $(LCLINTRN) cast2.c +checks -exportlocal -exportheader -expect 3
228
229 ### Two addition errors detected with 2.5 with -numliteral.
230
231 .PHONY: charlit
232 charlit:
233         $(LCLINTR) +hints charlit.c -expect 4
234         $(LCLINTR) +hints -numliteral charlit.c -expect 6
235         $(LCLINTR) +hints charlit.c +charintliteral +ignoresigns
236
237 .PHONY: clauses
238 clauses: 
239         $(LCLINTR) clauses.c +memchecks -expect 4
240         $(LCLINTR) clauses2.c +memchecks 
241         $(LCLINTR) clauses3.c +memchecks -expect 2
242         $(LCLINTR) clauses3.c +memchecks +unixlib -expect 3
243
244 .PHONY: commentchar
245 commentchar:
246         $(LCLINTR) commentchar.c -expect 4
247         $(LCLINTR) -commentchar '#' commentchar.c -expect 4
248
249 .PHONY: controldepth
250 controldepth:
251         $(LCLINTR) +hints -controlnestdepth 2 controldepth.c -expect 2
252         $(LCLINTR) +hints -controlnestdepth 1 controldepth.c -expect 2
253
254 .PHONY: compdestroy
255 compdestroy:
256         $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader -expect 1
257         $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy -expect 2
258         $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy +strictusereleased -expect 3
259         $(LCLINTRN) compdestroy.c +strict +partial -exportheader -expect 3
260
261 .PHONY: constannot
262 constannot:
263         ${LCLINTRN} constannot.c +arraybounds  -exportlocal -expect 2
264
265 .PHONY: csyntax
266 csyntax:
267         $(LCLINTR) +quiet -incondefs csyntax.c -expect 1 
268         $(LCLINTR) +quiet csyntax2.c -expect 2
269         $(LCLINTR) +quiet csyntax3.c -expect 1
270         $(LCLINTR) +quiet -incondefs csyntax4.c
271         $(LCLINTR) +quiet csyntax5.c
272         $(LCLINTR) +quiet csyntax6.c
273         $(LCLINTR) +quiet csyntax7.c
274         $(LCLINTR) +quiet csyntax8.c
275         $(LCLINTR) +quiet csyntax9.c
276         $(LCLINTR) +quiet csyntax10.c
277         $(LCLINTR) +quiet csyntax11.c
278         $(LCLINTR) +quiet csyntax12.c
279         $(LCLINTR) +quiet csyntax13.c -expect 1
280         $(LCLINTR) +quiet csyntax14.c
281         $(LCLINTR) +quiet csyntax15.c
282         $(LCLINTR) +quiet csyntax16.c -expect 2
283         $(LCLINTR) +quiet csyntax17.c -expect 3
284
285 .PHONY: czechnames
286 czechnames:
287         $(LCLINTR) czechnames.c
288         $(LCLINTR) +hints +czech czechnames.c -expect 2
289         $(LCLINTR) +hints +czech -czechvars czechnames.c -expect 1
290         $(LCLINTR) +hints +czech -accessczech czechnames.c -expect 6
291
292 .PHONY: czechoslovaknames
293 czechoslovaknames:
294         $(LCLINTR) +hints +czechoslovak czechnames.c -expect 1
295         $(LCLINTR) +hints +czechoslovak slovaknames.c -expect 1
296         $(LCLINTR) +hints +czechoslovak +slovakvars slovaknames.c -expect 2
297
298 ###
299 ### deadparam added 2001-05-27
300 ###
301
302 .PHONY: deadparam
303 deadparam:
304         ${LCLINTR} deadparam.c -expect 3
305
306 #
307 # Was expect 3 before 2.4.  Earlier versions did not handle implicit
308 # function pointers correctly.
309 #
310
311 .PHONY: decl
312 decl:
313         $(LCLINTR) decl.c -expect 2
314         $(LCLINTRN) decl.c +strict -exportlocal -expect 5
315         $(LCLINTR) decl2 -expect 4
316
317 .PHONY: enum
318 enum:
319         $(LCLINTR) enum -expect 16
320         $(LCLINTR) enum -misscase -expect 14
321
322 .PHONY: exports
323 exports:
324         $(LCLINTR) exports.c +exporttype +exportvar +exportfcn +topuse +typeuse -expect 6
325         $(LCLINTR) exports.c +exportany -expect 3
326         $(LCLINTR) exports.c
327
328 .PHONY: external
329 external:
330         $(LCLINTR) external.c +partial
331         $(LCLINTR) external.c +partial +distinctexternalnames -expect 2
332         $(LCLINTR) external.c -nolib +partial -externalnamelength 3 -expect 3
333         $(LCLINTR) external.c -nolib +partial -externalnamelength 3 +externalnamecaseinsensitive -expect 3
334         $(LCLINTR) external.c +partial -externalnamelength 3 -expect 4
335
336 .PHONY: fields
337 fields:
338         $(LCLINTR) fields.c +memchecks -expect 6
339         $(LCLINTR) fields2.c +memchecks -expect 5
340         $(LCLINTR) fields3.c +memchecks
341
342 .PHONY: flags
343 flags:
344         $(LCLINTR) flags.c -expect 8
345         $(LCLINTR) +nocomments flags.c -expect 2
346
347 ### Added 2001-06-02
348
349 .PHONY: forbody
350 forbody:
351         ${LCLINTR} forbody.c -expect 2
352
353 ### Added 2001-06-03
354 .PHONY: format
355 format:
356         ${LCLINTR} format.c -expect 3
357         ${LCLINTR} format.c -formatconst 
358
359 # two new errors (invalid lhs)
360
361 .PHONY: funcpointer
362 funcpointer:
363         $(LCLINTR) +memchecks +noparams funcpointer.c -expect 18
364
365 .PHONY: glob
366 glob:
367         $(LCLINTR) glob -expect 4
368         $(LCLINTR) glob -globuse -expect 3
369         $(LCLINTR) glob +globunspec -expect 6
370
371 .PHONY: globals
372 globals:
373         $(LCLINTR) -modifies globals.c -expect 5
374         $(LCLINTR) -modifies globals.c +allglobals -expect 6
375         $(LCLINTR) -modifies globals.c +impcheckedglobals -expect 6
376         $(LCLINTR) -modifies globals.c -globals -checkstrictglobals -expect 2
377         $(LCLINTR) -modifies globals.c +globunspec -expect 6
378         $(LCLINTR) -modifies globals.c +globunspec +allglobals -expect 8
379
380 # Was -accessfile
381 .PHONY: impabstract
382 impabstract: 
383         $(LCLINTR) -accessmodule impabstract.c 
384         $(LCLINTR) -accessmodule +hints +impabstract impabstract.c -expect 2
385         $(LCLINTR) -accessmodule +hints +impabstract impabstract -expect 4
386
387 ### evans 2001-10-14: Expected errors updated
388 .PHONY: init
389 init:
390         $(LCLINTR) init.c -expect 14
391         $(LCLINTRN) init.c +checks -exportlocal -exportheadervar -expect 17
392
393
394 .PHONY: inparam
395 inparam:
396         $(LCLINTR) inparam.c -expect 2
397         $(LCLINTR) +impouts inparam.c -expect 1
398
399 .PHONY: internal
400 internal:
401         $(LCLINTR) internal.c -expect 1
402         $(LCLINTR) internal.c +distinctinternalnames -expect 2
403         $(LCLINTR) internal.c -internalnamelen 28 -expect 3
404         $(LCLINTR) internal.c +internalnamecaseinsensitive -expect 3
405         $(LCLINTR) internal.c +internalnamecaseinsensitive +internalnamelookalike -expect 11
406
407 ###
408 ### iter
409 ### 2001-06-06: Error message for iter.lcl:3,6 fixed to iter.lcl:3:6
410 ### 
411
412 .PHONY: iter
413 iter:
414         $(LCLINTR) iter -expect 14 -lclexpect 1
415         $(LCLINTR) iter2.c -expect 12
416
417 .PHONY: keep
418 keep:
419         $(LCLINTR) keep.c +memchecks -expect 6
420
421 ### libs
422 ### 2001-05-22: 2 new errors found (fixed spec of signal)
423 ### 2001-05-30: 3 new errors found (formatconst)
424
425 .PHONY: libs
426 libs:
427         $(LCLINTR) libs.c +longunsignedunsignedintegral -expect 18
428         $(LCLINTR) libs.c -expect 22
429         $(LCLINTR) libs.c +globunspec +modunspec -expect 25
430         $(LCLINTR) libs.c +strictlib +globunspec +modunspec -expect 42
431
432 .PHONY: lintcomments
433 lintcomments:
434         $(LCLINTR) lintcomments.c -expect 4
435         $(LCLINTR) lintcomments.c -warnlintcomments -expect 1
436         $(LCLINTR) lintcomments.c -lintcomments -expect 4
437
438 .PHONY: list
439 list:
440         $(LCLINTR) list.c -expect 3
441
442 .PHONY: macros
443 macros:
444         $(LCLINTR) macros -expect 17 
445         $(LCLINTR) macros.c +allmacros -expect 34
446         $(LCLINTR) macros.c +fcnmacros -expect 31
447
448
449 .PHONY: macrosef
450 macrosef:
451         $(LCLINTR) macrosef -expect 4
452         $(LCLINTR) macrosef.c +allmacros -expect 3
453         $(LCLINTR) macrosef.c +allmacros +sefuncon -expect 4
454
455 .PHONY: merge
456 merge:
457         $(LCLINTRN) merge.c +checks -exportlocal -exportheadervar -exportheader -expect 3
458
459 .PHONY: modifies
460 modifies:
461         $(LCLINTR) modifies.c modclient.c +impcheckedstatics +mustmod -expect 7
462
463 .PHONY: modtest
464 modtest:
465         $(LCLINTR) modtest -expect 10
466         $(LCLINTR) modtest +modunspec -expect 13
467         $(LCLINTR) modtest +mustmod -expect 14
468
469 .PHONY: moduncon
470 moduncon:
471         $(LCLINTR) moduncon.c +moduncon -memchecks -expect 4
472         $(LCLINTRN) moduncon.c +strict -exportlocal -expect 22
473
474 .PHONY: mongoincludes
475 mongoincludes:
476         $(LCLINTR) mongoincludes.c -includenest 1 -expect 19
477         $(LCLINTR) mongoincludes.c -includenest 2 -expect 10
478         $(LCLINTR) mongoincludes.c -includenest 3 -expect 4
479         $(LCLINTR) mongoincludes.c -includenest 4 -expect 1
480         $(LCLINTR) mongoincludes.c -includenest 5 -expect 0
481
482 .PHONY: mystrncat
483 mystrncat:
484         $(LCLINTR) mystrncat.c +arraybounds  +arrayboundsread -expect 4 
485
486 .PHONY: noeffect
487 noeffect:
488         ${LCLINT} -nof noeffect.c +allmacros +checks -expect 3
489
490 .PHONY: null
491 null: 
492         $(LCLINTR) null1.c -expect 14
493         $(LCLINTR) null1.c -null -expect 4
494         $(LCLINTR) null2.c -expect 10
495         $(LCLINTR) null3.c -expect 15
496         $(LCLINTR) null3.c -warnunixlib +unixlib -expect 16
497         $(LCLINTR) null4.c -expect 1
498         $(LCLINTR) null5.c -expect 4
499         $(LCLINTR) null6 -expect 4
500         $(LCLINTR) +quiet null6.lcl -dump null6
501         $(LCLINTR) null6.c -load null6 -expect 4
502
503 ### Added for 3.0 (bugs reported by Kevin Broady)
504
505 .PHONY: nullret
506 nullret:
507         $(LCLINTR) nullret.c -expect 2
508         $(LCLINTR) -nullret nullret.c -expect 1
509
510 .PHONY: nullassign
511 nullassign:
512         $(LCLINTR) nullassign.c -expect 2
513         $(LCLINTR) -nullassign nullassign.c -expect 1
514
515
516 #
517 # Before 2.4, expected one more because error was reported both as 
518 # dependent and observer.
519 #
520
521 .PHONY: observer
522 observer:
523         $(LCLINTRN) observer +checks -exportlocal -exportheader -expect 9
524         $(LCLINTRN) observer.c +checks -exportlocal -exportheader -expect 8
525         $(LCLINTR) observer.c -expect 7
526
527 .PHONY: oldstyle
528 oldstyle:
529         $(LCLINTR) oldstyle -expect 3
530
531 .PHONY: outglob
532 outglob:
533         $(LCLINTR) outglob -expect 10
534
535 .PHONY: outparam
536 outparam:
537         $(LCLINTR) outparam -expect 12
538
539 ### evans 2001-08-26: postnotnull new
540
541 .PHONY: postnotnull
542 postnotnull:
543         ${LCLINTR} postnotnull.c -expect 1
544 #
545 # Four new +fcnuse errors for -strict (evans 2001-07-22)
546
547
548 .PHONY: preds
549 preds:
550         $(LCLINTR) +hints preds.c -expect 6
551         $(LCLINTRN) +hints preds.c -weak -expect 1
552         $(LCLINTRN) +hints preds.c -strict -exportlocal -exportheader -expect 12
553
554 .PHONY: prefixes
555 prefixes:
556         $(LCLINTR) prefixes.c +partial
557         $(LCLINTRN) prefixes.c +allmacros +checks -exportlocal +partial -exportheader -exportheadervar -expect 4
558         $(LCLINTR) prefixes.c -typeprefix "T" -expect 2
559         $(LCLINTR) prefixes.c -typeprefix "^" -expect 1
560         $(LCLINTR) prefixes.c -typeprefix "^*" -expect 2
561         $(LCLINTR) prefixes.c -typeprefix "^%*" -expect 2
562         $(LCLINTR) prefixes.c -typeprefix "^~*" -expect 2
563         $(LCLINTR) prefixes.c -typeprefix "^" +typeprefixexclude -expect 7
564         $(LCLINTR) prefixes.c -filestaticprefix "^^" -expect 4
565         $(LCLINTR) prefixes.c -filestaticprefix "^#" -expect 5
566         $(LCLINTR) prefixes.c -filestaticprefix "^?&x" -expect 5
567         $(LCLINTR) prefixes.c -globalprefix "G" -expect 1
568         $(LCLINTR) prefixes.c -globalprefix "&G?_^" -expect 1
569         $(LCLINTR) prefixes.c -externalprefix "G" -expect 5
570         $(LCLINTR) prefixes.c -typeprefix "T" -externalprefix "G" -expect 4
571         $(LCLINTR) prefixes.c -localprefix "?*" +localprefixexclude -expect 13
572
573 .PHONY: printflike
574 printflike:
575         $(LCLINTR) printflike.c -expect 6
576         $(LCLINTR) printflike.c -warnlintcomments -expect 5
577
578 .PHONY: rc
579 rc:
580         $(LCLINTR) -DMYSTERY='"a flag\"wicked cool"' rc.c -expect 1
581         $(LCLINTR) -DMYSTERY=12 rc.c -expect 1
582         $(LCLINTR) -f rc1.lclintrc rc.c -expect 1
583         $(LCLINTR) -UMYSTERY -f rc1.lclintrc rc.c -expect 1
584         $(LCLINTR) -f rc3.lclintrc rc.c -expect 1
585
586 .PHONY: refcounts
587 refcounts:
588         $(LCLINTR) refcounts.c -expect 7 
589
590 .PHONY: release
591 release:
592         $(LCLINTR) release.c +memchecks -expect 1
593
594 .PHONY: repexpose
595 repexpose:
596         $(LCLINTR) +lh repexpose +memchecks -expect 12
597         $(LCLINTR) repexpose +memchecks +retalias -expect 15
598         $(LCLINTRN) repexpose +checks -exportlocal -expect 27
599
600 ### returned added 2001-05-27
601 ### (Bug discovered checking lclint sources.)
602
603 .PHONY: returned
604 returned:
605         ${LCLINTR} returned.c -expect 1
606
607 .PHONY: sharing
608 sharing: 
609         $(LCLINTR) sharing1.c -expect 21
610         $(LCLINTR) sharing3.c -expect  3
611         $(LCLINTR) sharing4.c -expect 13
612         $(LCLINTR) sharing4.c -paramimptemp -expect 12
613         $(LCLINTR) sharing5.c -expect 6
614
615 .PHONY: slovaknames
616 slovaknames:
617         $(LCLINTR) +hints slovaknames.c -expect 1
618         $(LCLINTR) +hints slovaknames.c +accessslovak 
619         $(LCLINTR) +hints +slovak slovaknames.c -expect 3
620         $(LCLINTR) +hints +slovak -slovakvars slovaknames.c -expect 2
621         $(LCLINTR) +hints +slovak -accessslovak slovaknames.c -expect 7
622
623 .PHONY: specclauses
624 specclauses:
625         $(LCLINTR) specclauses.c -expect 6
626         $(LCLINTR) specclauses2.c -expect 8
627         $(LCLINTR) specclauses3.c -expect 6
628         $(LCLINTR) specclauses4.c -expect 3
629         $(LCLINTR) specclauses5.c -expect 3
630
631 .PHONY: special
632 special:
633         $(LCLINTR) special -expect 20
634         $(LCLINTR) special -relaxquals -expect 22
635
636 .PHONY: stack
637 stack:
638         $(LCLINTR) stack.c -expect 5
639         $(LCLINTR) stack.c -stackref
640
641 .PHONY: staticarray
642 staticarray:
643         $(LCLINTR) staticarray.c -expect 3
644
645 .PHONY: strings
646 strings:
647         $(LCLINTR) strings.c -expect 3
648         $(LCLINTR) -readonlystrings -expect 1 strings.c
649         $(LCLINTR) +modobserverstrict -maintype -expect 4 strings.c
650
651 .PHONY: structassign
652 structassign:
653         $(LCLINTR) structassign.c -expect 4
654
655 .PHONY: typequals
656 typequals:
657         $(LCLINTR) typequals.c tq.lcl -expect 5
658         $(LCLINTR) typequals.c -expect 2
659
660 .PHONY: ud
661 ud:
662         $(LCLINTR) ud.c -expect 9
663         $(LCLINTR) ud2 -specundef -expect 3
664
665 .PHONY: ulstypes
666 ulstypes:
667         $(LCLINTR) ulstypes.c -expect 8
668         $(LCLINTR) ulstypes.c +ignorequals 
669         $(LCLINTRN) ulstypes.c +strict -exportheader -exportheadervar -expect 28
670 # 3 more detected with version 2.5 (change in -numliteral setting)
671
672 .PHONY: union
673 union:
674         $(LCLINTR) +memchecks union.c -expect 8
675
676 .PHONY: unreachable
677 unreachable:
678         $(LCLINTR) unreachable.c -expect 5
679         $(LCLINTR) -unreachable unreachable.c -expect 2
680         $(LCLINTR) switch.c -expect 4
681
682 .PHONY: unsignedcompare
683 unsignedcompare:
684         ${LCLINTR} +posixlib unsignedcompare.c -expect 4
685
686
687 ###
688 ### 2001-06-08 evans: 2 new errors after fixing ansireserved name checks
689 ###
690
691 .PHONY: unused
692 unused:
693         $(LCLINTRN) unused.c +checks -exportlocal -expect 5
694         $(LCLINTRN) unused.c +checks -exportlocal +topuse -expect 8
695
696 ###
697 ### 2001-06-10: Provided by Jim Zalenka
698 ###
699
700 .PHONY: ullint
701 ullint:
702         ${LCLINTRN} ullint.c -expect 5
703         ${LCLINTRN} ullint.c +charint +charintliteral -expect 2
704
705 .PHONY: void
706 void:
707         ${LCLINTRN} void.c -expect 2
708
709 ###
710 ### New since 2.5q:
711 ###
712
713 .PHONY: linked
714 linked:
715         ${LCLINTR} linked.c -expect 4
716         ${LCLINTR} linked2.c -expect 3
717         ${LCLINTR} linked3.c -expect 5
718         ${LCLINTR} linked4.c -expect 6
719         ${LCLINTR} linked5.c -expect 4
720         ${LCLINTR} linked6.c -expect 4
721
722 .PHONY: freearray
723 freearray:
724         ${LCLINTR} freearray.c -expect 1
725
726 ###
727 ### Bugs fixed and new features since version 2.1b
728 ###
729
730 SUBDIRTESTS += tests2.2
731
732 .PHONY: tests2.2a
733 tests2.2a:
734         @cd tests2.2a ; \
735         $(LCLINTR) erik.c -expect 1 ; \
736         $(LCLINTR) boolcomp.c -expect 5 ; \
737         $(LCLINTR) boolenum.c ; \
738         $(LCLINTR) addassign.c -expect 1; \
739         $(LCLINTR) toralf.c -expect 5 ; \
740         $(LCLINTR) fred.c -booltype Bool ; \
741         $(LCLINTR) sizeof.c ; \
742         $(LCLINTR) arrayparam.c -expect 5 ; \
743         $(LCLINTR) notreached.c ; \
744         $(LCLINTR) duff.c -casebreak -firstcase ; \
745         $(LCLINTR) obviousloop.c -expect 4 ; \
746         $(LCLINTR) bitops.c +bitwisesigned -expect 11 ; \
747         $(LCLINTR) bitops.c -expect 5 ; \
748         $(LCLINTR) isalpha.c +strictlib -expect 1 ; \
749         $(LCLINTR) isalpha.c -expect 1 ; \
750         $(LCLINTR) dobb.c ; \
751         $(LCLINTR) popik.c -expect 11
752
753 SUBDIRTESTS += tests2.4
754
755 .PHONY: sizeotest
756 sizeoftest:
757         @cd sizeoftest; \
758         $(LCLINTR) +arraybounds  +arrayboundsread sizeof.c
759
760 .PHONY: bufferTest
761 bufferTest:
762         @cd bufferTest; \
763         $(LCLINTR) +arraybounds  +arrayboundsread test4.c test6.c
764
765 .PHONY: simplebufferConstraintTests
766 simplebufferConstraintTests:
767         @cd simplebufferConstraintTests; \
768         $(LCLINTR) +arraybounds  +arrayboundsread m.c  sizeof.c  test3.c  test7.c
769
770 .PHONY: moreBufferTests
771 moreBufferTests:
772         @cd moreBufferTests; \
773         $(LCLINTR) +arraybounds  +arrayboundsread  unrecogCall.c strrchr.c initialization.c simplifyTest.c strncatNotReallyGood.c strncatReallyGood.c
774
775 .PHONY: maxset
776 maxset:
777         @cd maxset; \
778         $(LCLINTR) +arraybounds maxsetannotations.c; \
779         $(LCLINTR) +arraybounds maxsetnoannotations.c -expect 1
780
781 .PHONY: globalbufferannotation
782 globalbufferannotation:
783         @cd globalbufferannotation; \
784         $(LCLINTR) +arraybounds  +arrayboundsread globalvariable.c
785
786 .PHONY: strchr
787 strchr:
788         @cd strchr; \
789         $(LCLINTR) +arraybounds +arrayboundsread  strchr.c -expect 2
790
791 .PHONY: for
792 for:
793         @cd for; $(LCLINTR) +arraybounds +arrayboundsread for.c
794
795 SUBDIRTESTS += tests2.5
796
797 ## Integration Tests
798
799 ## evans 2000-12-22
800 ## db2: 2 errors are no longer reported, since eref is immutable.
801 ## Need to clarify what it means for an object to be immutable;
802 ## there should be 2 types with different storage requirements.
803
804 SUBDIRTESTS += db1 db2 db3
805
806 .PHONY: $(SUBDIRTESTS)
807 $(SUBDIRTESTS):
808         cd $@; $(MAKE) LCLINT="$(LCLINTRN)"
This page took 0.163211 seconds and 5 git commands to generate.