X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/87fa79e5e11203aaa46bc8fd3257e93fb6ced381..b05949b6920ce15fd7063643b59cce2f34528854:/test/Makefile.os2 diff --git a/test/Makefile.os2 b/test/Makefile.os2 index aca6680..26a428b 100644 --- a/test/Makefile.os2 +++ b/test/Makefile.os2 @@ -8,32 +8,6 @@ SHELL = cmd.exe -.PHONY: all fulltest quicktest funcpointer cast abstract -.PHONY: version help abstptr abstract alias alttypes ansireserved -.PHONY: argorder blocks break cases cast charlit -.PHONY: clauses commentchar -.PHONY: compdestroy constannot controldepth csyntax czechnames czechoslovaknames -.PHONY: deadparam decl enum exports external fields fileio flags forbody format funcpointer glob globals -.PHONY: impabstract init inparam internal iter keep libs lintcomments -.PHONY: list macros macrosef merge mergestate modifies modtest moduncon mongoincludes -.PHONY: noeffect null observer oldstyle outglob outparam postnotnull preds prefixes printflike rc -.PHONY: refcounts release repexpose returned sharing slovaknames special -.PHONY: specclauses stack staticarray -.PHONY: strings structassign nullret -.PHONY: tainted typequals ud ulstypes union unreachable unused ullint unsignedcompare void -.PHONY: db1 db2 db3 tests2.2 tests2.2a tests2.4 tests2.5 -.PHONY: all test fulltest expects quicktest -.PHONY: warnuse metastate -.PHONY: linked freearray -.PHONY: sizeoftest -.PHONY: bufferTest -.PHONY: simplebufferConstraintTests -.PHONY: moreBufferTests -.PHONY: maxset -.PHONY: globalbufferannotation -.PHONY: strchr -.PHONY: for - .SUFFIXES: .out .expect .c .lcl .h .lh .diff # -u show context @@ -50,37 +24,41 @@ SPLINTP = $(SPLINT) -nof SPLINTRN = $(SPLINTP) -hints -booltype "bool" SPLINTR = $(SPLINTRN) -exportlocal +debugfcnconstraint -SPLINTRNNEST = $(SPLINTPNEST) -hints -booltype "bool" +SPLINTRNNEST = $(SPLINTPNEST) -hints -booltype bool SPLINTRNEST = $(SPLINTRNNEST) -exportlocal +debugfcnconstraint ### ### rcfiles not included becuase file names will not match exactly ### + UNITTESTS = \ help \ abstptr abstract alias alttypes ansireserved argorder \ - args arraydims blocks break cases cast charlit clauses commentchar compdestroy \ - constannot controldepth csyntax czechnames czechoslovaknames deadparam \ - decl divzero enum exports external fields flags forbody format freearray \ + args arraydims arrayinit arraylit blocks break cases cast chararraylit charlit clauses commentchar compdestroy \ + compoundliterals compoundstmt constannot controldepth csyntax czechnames czechoslovaknames deadparam \ + decl divzero enum enumtag exports external fields flags forbody format freearray \ funcpointer functionmacro glob globals impabstract info init inparam internal iter keep libs \ - linked lintcomments list loopexec \ + linked lintcomments list longint loopexec looptesteffect \ macros macrosef merge mergenull modifies modtest moduncon \ - mongoincludes mystrncat noeffect null observer oldstyle outglob outparam \ + mongoincludes mystrncat noeffect null nullret nullassign numabstract observer oldstyle outglob outparam \ parentype postnotnull preds prefixes printflike rc refcounts release repexpose \ - returned sharing shifts slovaknames \ + returned sharing shifts sizesigns slovaknames \ specclauses \ special stack staticarray strings \ stringliteral \ - structassign typequals ud ulstypes union unioninit unreachable unsignedcompare \ + structassign typequals typeof ud ulstypes union unioninit \ + unnamedsu unreachable unsignedcompare \ unused ullint utypes void widestrings UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS)) ### warnuse doesn't work yet! -SUBDIRTESTS = metastate mergestate tainted fileio \ +SUBDIRTESTS1 = metastate mergestate fileio \ simplebufferConstraintTests moreBufferTests moreBufferTests2 globalbufferannotation \ - maxset strchr for manual\ -tests2.2 tests2.4 tests2.5 db1 db2 db3 + maxset strchr sizeoftest for manual +SUBDIRTESTS1 = tests2.5 db1 db2 db3 +SUBDIRTESTS2 = tainted tests2.2 tests2.4 +SUBDIRTESTS = $(SUBDIRTESTS1) $(SUBDIRTESTS2) SPLINTTESTS = $(UNITTESTS) $(SUBDIRTESTS) @@ -99,11 +77,12 @@ quicktest: $(SPLINTTESTS) help: -@$(SPLINT) - #@LARCH_PATH=/dev/null; $(SPLINT) -nof empty.lcl - @$(SPLINTP) -help - @$(SPLINTP) -asdf - @$(SPLINTP) +boolint +boolint - @$(SPLINTP) -help flags alpha + -@$(SPLINT) -help + -@$(SPLINTP) -asdf + -@$(SPLINTP) +boolint +boolint + -@$(SPLINT) -help flags alpha + +### Rules for tests start here .PHONY: abstptr abstptr: @@ -161,6 +140,15 @@ arraydims: $(SPLINTR) arraydims.c -varuse -expect 2 $(SPLINTR) arraydims.c -initsize -varuse +.PHONY: arrayinit +arrayinit: + $(SPLINTR) arrayinit.c -expect 9 + +.PHONY: arraylit +arraylit: + $(SPLINTR) arraylit.c -expect 2 + $(SPLINTR) arraylit.c +stringliteralsmaller -expect 4 + .PHONY: blocks blocks: $(SPLINTR) blocks.c -expect 4 @@ -188,13 +176,18 @@ cast: $(SPLINTR) cast -accessmodule -expect 20 $(SPLINTRN) cast2.c +checks -exportlocal -exportheader -expect 3 +.PHONY: chararraylit +chararraylit: + $(SPLINTR) chararraylit.c -expect 2 + ### Two addition errors detected with 2.5 with -numliteral. +### evans 2002-12-15: finds one more but in charlit .PHONY: charlit charlit: $(SPLINTR) +hints charlit.c -expect 4 $(SPLINTR) +hints -numliteral charlit.c -expect 6 - $(SPLINTR) +hints charlit.c +charintliteral +ignoresigns + $(SPLINTR) +hints charlit.c +charintliteral +ignoresigns -expect 1 .PHONY: clauses clauses: @@ -218,7 +211,15 @@ compdestroy: $(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader -expect 1 $(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy -expect 2 $(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy +strictusereleased -expect 3 - $(SPLINTRN) compdestroy.c +strict +partial -exportheader -expect 3 + $(SPLINTRN) compdestroy.c +strict +partial -exportheader -expect 4 + +.PHONY: compoundliterals +compoundliterals: + ${SPLINTRN} compoundliterals.c + +.PHONY: compoundstmt +compoundstmt: + ${SPLINTRN} compoundstmt.c -expect 3 .PHONY: constannot constannot: @@ -273,7 +274,7 @@ deadparam: .PHONY: decl decl: $(SPLINTR) decl.c -expect 2 - $(SPLINTRN) decl.c +strict -exportlocal -expect 5 + $(SPLINTRN) decl.c +strict -exportlocal -expect 6 $(SPLINTR) decl2 -expect 4 .PHONY: divzero @@ -285,6 +286,10 @@ enum: $(SPLINTR) enum -expect 16 $(SPLINTR) enum -misscase -expect 14 +.PHONY: enumtag +enumtag: + $(SPLINTR) enumtag.c -expect 2 + .PHONY: exports exports: $(SPLINTR) exports.c +exporttype +exportvar +exportfcn +topuse +typeuse -expect 6 @@ -399,13 +404,14 @@ keep: ### libs ### 2001-05-22: 2 new errors found (fixed spec of signal) ### 2001-05-30: 3 new errors found (formatconst) +### 2002-07-08: 2 new errors found (getc modifies errno) .PHONY: libs libs: $(SPLINTR) libs.c +longunsignedunsignedintegral -expect 18 $(SPLINTR) libs.c -expect 22 $(SPLINTR) libs.c +globunspec +modunspec -expect 25 - $(SPLINTR) libs.c +strictlib +globunspec +modunspec -expect 42 + $(SPLINTR) libs.c +strictlib +globunspec +modunspec -expect 44 .PHONY: lintcomments lintcomments: @@ -417,6 +423,17 @@ lintcomments: list: $(SPLINTR) list.c -expect 3 +### +### 2002-12-12: Added test case for +longint and +shortint flags +### + +.PHONY: longint +longint: + $(SPLINTR) longint.c -expect 3 + $(SPLINTR) longint.c +longint -expect 2 + $(SPLINTR) longint.c +shortint -expect 2 + $(SPLINTR) longint.c +shortint +longint -expect 0 + ### ### 2002-01-01: Added test case for obvious loop execution. ### @@ -426,6 +443,10 @@ loopexec: $(SPLINTR) loopexec.c -expect 1 $(SPLINTR) loopexec.c -obviousloopexec -expect 3 +.PHONY: looptesteffect +looptesteffect: + $(SPLINTR) looptesteffect.c -expect 1 + .PHONY: macros macros: $(SPLINTR) macros -expect 17 @@ -459,7 +480,7 @@ modtest: .PHONY: moduncon moduncon: $(SPLINTR) moduncon.c +moduncon -memchecks -expect 4 - $(SPLINTRN) moduncon.c +strict -exportlocal -expect 22 + $(SPLINTRN) moduncon.c +strict +impboundsconstraints -exportlocal -expect 22 .PHONY: mongoincludes mongoincludes: @@ -488,7 +509,7 @@ null: $(SPLINTR) null1.c -null -mustdefine -expect 4 $(SPLINTR) null2.c -expect 11 $(SPLINTR) null3.c -expect 15 - $(SPLINTR) null3.c -warnunixlib +unixlib -expect 16 + $(SPLINTR) null3.c +unixlib -expect 16 $(SPLINTR) null4.c -expect 1 $(SPLINTR) null5.c -expect 4 $(SPLINTR) null6 -expect 4 @@ -500,13 +521,21 @@ null: .PHONY: nullret nullret: $(SPLINTR) nullret.c -expect 2 - $(SPLINTR) -nullret nullret.c -expect 1 + $(SPLINTR) -nullret nullret.c -expect 0 .PHONY: nullassign nullassign: $(SPLINTR) nullassign.c -expect 2 $(SPLINTR) -nullassign nullassign.c -expect 1 +### Added for 3.1 - evans 2002-12-14 + +.PHONY: numabstract +numabstract: + $(SPLINTR) numabstract.c -expect 11 + $(SPLINTR) numabstract.c +numabstractlit -expect 9 + $(SPLINTR) numabstract.c -numabstractcast -expect 10 + # # Before 2.4, expected one more because error was reported both as # dependent and observer. @@ -549,7 +578,7 @@ parentype: preds: $(SPLINTR) +hints preds.c -expect 6 $(SPLINTRN) +hints preds.c -weak -expect 1 - $(SPLINTRN) +hints preds.c -strict -exportlocal -exportheader -expect 12 + $(SPLINTRN) +hints preds.c -strict +impboundsconstraints -exportlocal -exportheader -expect 10 .PHONY: prefixes prefixes: @@ -568,7 +597,7 @@ prefixes: $(SPLINTR) prefixes.c -globalprefix "&G?_^" -expect 1 $(SPLINTR) prefixes.c -externalprefix "G" -expect 5 $(SPLINTR) prefixes.c -typeprefix "T" -externalprefix "G" -expect 4 -# herbert: unsolved problem with quoting the '*' here! +# Herbert: this does not work under OS/2 # $(SPLINTR) prefixes.c -localprefix "?*" +localprefixexclude -expect 13 .PHONY: printflike @@ -587,7 +616,7 @@ rc: .PHONY: rcfiles rcfiles: - cd rcfiles; ${MAKE} SPLINT="$(SPLINTPNEST)" + cd rcfiles; ${MAKE} SPLINT="-$(SPLINTPNEST)" .PHONY: refcounts refcounts: @@ -624,6 +653,13 @@ shifts: $(SPLINTR) shifts.c -shiftimplementation -expect 3 $(SPLINTR) shifts.c -shiftnegative -expect 1 +#drl comment this out until sizesigns is added to cvs + +### evans - added 2002-08-17: check warnings with arbitrary integral types +sizesigns: + $(SPLINTR) +strict sizesigns.c -expect 5 + $(SPLINTR) +strict +matchanyintegral sizesigns.c -expect 4 + .PHONY: slovaknames slovaknames: $(SPLINTR) +hints slovaknames.c -expect 1 @@ -636,7 +672,7 @@ slovaknames: specclauses: $(SPLINTR) specclauses.c -expect 6 $(SPLINTR) specclauses2.c -expect 8 - $(SPLINTR) specclauses3.c -expect 6 + $(SPLINTR) specclauses3.c -expect 5 $(SPLINTR) specclauses4.c -expect 3 $(SPLINTR) specclauses5.c -expect 3 @@ -674,10 +710,14 @@ stack: staticarray: $(SPLINTR) staticarray.c -expect 3 +### +### evans 2002-03-16: Default setting of stringliteralnoroomfinalnull changed +### + .PHONY: stringliteral stringliteral: - $(SPLINTR) stringliteral.c +stringliteralnoroomfinalnull -expect 4 - $(SPLINTR) stringliteral.c -expect 3 + $(SPLINTR) stringliteral.c -stringliteralnoroomfinalnull -expect 3 + $(SPLINTR) stringliteral.c -expect 4 .PHONY: strings strings: @@ -689,6 +729,10 @@ strings: structassign: $(SPLINTR) structassign.c -expect 4 +.PHONY: typeof +typeof: + $(SPLINTR) typeof.c -expect 2 + .PHONY: typequals typequals: $(SPLINTR) typequals.c tq.lcl -expect 5 @@ -720,6 +764,10 @@ union: unioninit: $(SPLINTR) unioninit.c -expect 2 +.PHONY: unnamedsu +unnamedsu: + $(SPLINTR) unnamedsu.c -expect 0 + .PHONY: unreachable unreachable: $(SPLINTR) unreachable.c -expect 5 @@ -751,11 +799,12 @@ ullint: ### ### 2001-12-30: Poor warnings reported by Peter Deutsch ### +### 2002-07-03: removed warnings for datatype/macro definitions +### .PHONY: utypes utypes: -# herbert: TODO - -${SPLINTRN} utypes.c -expect 6 + ${SPLINTRN} utypes.c -expect 2 ### @@ -796,7 +845,15 @@ sizeof: buffertest: $(SPLINTR) +bounds buffertest1.c -expect 5 -.PHONY: $(SUBDIRTESTS) -$(SUBDIRTESTS): - $(MAKE) -C $@ SPLINT="$(SPLINTRNNEST)" +.PHONY: $(SUBDIRTESTS1) +$(SUBDIRTESTS1): + $(MAKE) -C $@ SPLINT="$(SPLINTRNNEST)" + +.PHONY: $(SUBDIRTESTS2) +$(SUBDIRTESTS2): + $(MAKE) -C $@ SPLINT="$(SPLINTRNNEST)" -f Makefile.os2 +# sizesigns.c sizesigns.expect \ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: