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