# -u show context
-## Set up the splint commands
+#drl 3/27/2002 get the test suit to print a warning when splint is built under /usr/
+
-SPLINT = $(top_builddir)/src/splint$(EXEEXT)
+## Set up the splint commands
-unexport LARCH_PATH
-unexport LCLIMPORTDIR
+SPLINT = $(top_builddir)/src/splint$(EXEEXT)
+### These are shell-specific
+## unexport LARCH_PATH
+## unexport LCLIMPORTDIR
### This is horrible! Can't we make top_builddir absolute?
SPLINTNEST = ../$(top_builddir)/src/splint$(EXEEXT)
UNITTESTS = \
help \
abstptr abstract alias alttypes ansireserved argorder \
- args blocks break cases cast charlit clauses commentchar compdestroy \
- constannot controldepth csyntax czechnames czechoslovaknames deadparam \
- decl 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 loopexec looptesteffect \
macros macrosef merge mergenull modifies modtest moduncon \
mongoincludes mystrncat noeffect null observer oldstyle outglob outparam \
- postnotnull preds prefixes printflike rc refcounts release repexpose \
+ parentype postnotnull preds prefixes printflike rc refcounts release repexpose \
returned sharing shifts slovaknames \
specclauses \
special stack staticarray strings \
- structassign typequals ud ulstypes union unioninit unreachable unsignedcompare \
+ stringliteral \
+ structassign typequals typeof ud ulstypes union unioninit \
+ unnamedsu unreachable unsignedcompare \
unused ullint utypes void widestrings
UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS))
.PHONY: version
version:
- -$(SPLINTP) -help version
+ -$(SPLINT) -help version
.PHONY: help
help:
-@$(SPLINT)
-@LARCH_PATH=/dev/null; $(SPLINT) -nof empty.lcl
- -@$(SPLINTP) -help
+ -@$(SPLINT) -help
-@$(SPLINTP) -asdf
-@$(SPLINTP) +boolint +boolint
- -@$(SPLINTP) -help flags alpha
+ -@$(SPLINT) -help flags alpha
#commenting these out for the release because they will almost always fail
#since the default will only fit one system
#Don't want to panic the user...
-# -@$(SPLINTP) -help flags all | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
-# -@$(SPLINTP) -help flags full | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
-# -@$(SPLINTP) -help flags manual | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
+# -@$(SPLINT) -help flags all | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
+# -@$(SPLINT) -help flags full | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
+# -@$(SPLINT) -help flags manual | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
#larch and lclimportdir have different hardcoded default paths so don't include the path in the output..
# cat $$TEST.expect; \
# done
+CheckSystemDir = (pwd | grep -q "/usr" && echo "Warning tests which not run correctly when splint is built in /usr or a subdirectory under /usr. Build splint in a different directory or disregard test failures." )
+
.PHONY: quicktest
quicktest:
+ $(CheckSystemDir)
@for TEST in $(QUICKTESTS); do \
echo "Checking $$TEST..."; \
$(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.out && \
@echo "Testing $(PACKAGE) $(VERSION)..."
@echo
@echo "Version Info:"
- @$(SPLINTP) -help version
- @$(SPLINTP) -help vars
+ @$(SPLINT) -help version
+ @$(SPLINT) -help vars
@echo ""
@echo "Tests:"
@echo ""
args:
-$(SPLINTR) args -noeffect -expect 12
+.PHONY: arraydims
+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
-$(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.
.PHONY: charlit
-$(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy +strictusereleased -expect 3
-$(SPLINTRN) compdestroy.c +strict +partial -exportheader -expect 3
+.PHONY: compoundliterals
+compoundliterals:
+ ${SPLINTRN} compoundliterals.c
+
+.PHONY: compoundstmt
+compoundstmt:
+ ${SPLINTRN} compoundstmt.c -expect 3
+
.PHONY: constannot
constannot:
${SPLINTRN} constannot.c +boundswrite -exportlocal -expect 2
-$(SPLINTRN) decl.c +strict -exportlocal -expect 5
-$(SPLINTR) decl2 -expect 4
+.PHONY: divzero
+divzero:
+ -$(SPLINTR) divzero.c -varuse -expect 0
+
.PHONY: enum
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
### 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:
-$(SPLINTR) loopexec.c -expect 1
-$(SPLINTR) loopexec.c -obviousloopexec -expect 3
+.PHONY: looptesteffect
+looptesteffect:
+ -$(SPLINTR) looptesteffect.c -expect 1
.PHONY: macros
macros:
.PHONY: oldstyle
oldstyle:
- -$(SPLINTR) oldstyle -expect 3
+ -$(SPLINTR) oldstyle oldstyle2.c -expect 5
.PHONY: outglob
outglob:
.PHONY: postnotnull
postnotnull:
${SPLINTR} postnotnull.c -expect 1
+
+### evans 2002-02-09: added parentype.c
+.PHONY: parentype
+parentype:
+ ${SPLINTR} parentype.c
+
#
# Four new +fcnuse errors for -strict (evans 2001-07-22)
#
staticarray:
-$(SPLINTR) staticarray.c -expect 3
+###
+### evans 2002-03-16: Default setting of stringliteralnoroomfinalnull changed
+###
+
+.PHONY: stringliteral
+stringliteral:
+ -$(SPLINTR) stringliteral.c -stringliteralnoroomfinalnull -expect 3
+ -$(SPLINTR) stringliteral.c -expect 4
+
.PHONY: strings
strings:
-$(SPLINTR) strings.c -expect 3
structassign:
-$(SPLINTR) structassign.c -expect 4
+.PHONY: typeof
+typeof:
+ -$(SPLINTR) typeof.c -expect 2
+
.PHONY: typequals
typequals:
-$(SPLINTR) typequals.c tq.lcl -expect 5
unioninit:
-$(SPLINTR) unioninit.c -expect 2
+.PHONY: unnamedsu
+unnamedsu:
+ -$(SPLINTR) unnamedsu.c -expect 0
+
.PHONY: unreachable
unreachable:
-$(SPLINTR) unreachable.c -expect 5
###
### 2001-12-30: Poor warnings reported by Peter Deutsch
###
+### 2002-07-03: removed warnings for datatype/macro definitions
+###
.PHONY: utypes
utypes:
- ${SPLINTRN} utypes.c -expect 6
+ ${SPLINTRN} utypes.c -expect 2
###
./argorder5.c \
./args.c \
./arrayinit.c \
+ ./arraylit.c \
./blocks.c \
./branchstate.c \
./break.c \
./cases2.c \
./cast.c \
./cast2.c \
+ ./chararraylit.c \
./charlit.c \
./clauses.c \
./clauses2.c \
./commentchar.c \
./commentcmd.c \
./compdestroy.c \
+ ./compoundliterals.c ./compoundliterals.expect \
+ ./compoundstmt.c ./compoundstmt.expect \
./csyntax.c \
./constannot.c \
./controldepth.c \
./dkf5kSprintf.c \
./ensures.c \
./enum.c \
+ ./enumtag.c \
./exports.c \
./external.c \
./fields.c \
./union.c \
./unreachable.c \
./unsignedcompare.c \
+ ./unnamedsu.c \
./unused.c \
./void.c \
./conditions/miroslaw.c \
argorder.expect \
args.expect \
arrayinit.expect \
+ arraylit.expect \
blocks.expect \
branchstate.expect \
break.expect \
buffertest.expect \
cases.expect \
cast.expect \
+ chararraylit.expect \
charlit.expect \
clauses.expect \
commentchar.expect \
deadparam.expect \
decl.expect \
enum.expect \
+ enumtag.expect \
exports.expect \
external.expect \
fields.expect \
ullint.expect \
ulstypes.expect \
union.expect \
+ unnamedsu.expect \
unreachable.expect \
unsignedcompare.expect \
unused.expect \
./moreBufferTests2/Makefile \
./fileio/eof.mts ./fileio/file.mts ./fileio/filerw.mts ./mergestate/tainted.mts ./mergestate/taintednm.mts ./metastate/file.mts ./metastate/nullterminated.mts ./metastate/sockets.mts ./tainted/tainted-bad.mts ./tainted/tainted.mts ./fileio/file.xh ./fileio/filerw.xh ./mergestate/tainted.xh ./mergestate/taintednm.xh ./metastate/file.xh ./tainted/tainted.xh \
db2.old-expect union.pp warnuse.old-expect \
- ./tests2.5/badcomment ./tests2.5/boolbad ./tests2.5/booltest ./tests2.5/uconstants loopexec.expect mergenull.expect shifts.expect \
+ ./tests2.5/badcomment ./tests2.5/boolbad ./tests2.5/booltest ./tests2.5/uconstants loopexec.expect mergenull.expect shifts.expect looptesteffect.expect \
unioninit.expect unioninit.c utypes.c \
utypes.expect widestrings.expect widestrings.c \
functionmacro.expect functionmacro.c info.c info.expect \
- loopexec.c mergenull.c shifts.c \
+ loopexec.c looptesteffect.c mergenull.c shifts.c \
manual.expect ./manual/Makefile \
- ./manual/annotglobs.c ./manual/bool.c ./manual/bool.h ./manual/clauses.c ./manual/employee.h ./manual/exposure.c ./manual/globals.c ./manual/ignore.c ./manual/implicit.c ./manual/intSet.h ./manual/list.c ./manual/loop.c ./manual/macros.c ./manual/modify.c ./manual/mstring.c ./manual/mstring.h ./manual/mstringnn.c ./manual/multiError.c ./manual/names.c ./manual/noeffect.c ./manual/null.c ./manual/only.c ./manual/order.c ./manual/palindrome.c ./manual/palindrome.h ./manual/refs.c ./manual/returned.c ./manual/rgb.c ./manual/rstring.c ./manual/rstring.h ./manual/sample.c ./manual/setChar.c ./manual/setname.c ./manual/setname.h ./manual/special.c ./manual/stack.c ./manual/sumsquares.c ./manual/switch.c ./manual/testpal.c ./manual/types.c ./manual/unique.c ./manual/usedef.c ./manual/bounds.c
+ ./manual/annotglobs.c ./manual/bool.c ./manual/bool.h ./manual/clauses.c ./manual/employee.h ./manual/exposure.c ./manual/globals.c ./manual/ignore.c ./manual/implicit.c ./manual/intSet.h ./manual/list.c ./manual/loop.c ./manual/macros.c ./manual/modify.c ./manual/mstring.c ./manual/mstring.h ./manual/mstringnn.c ./manual/multiError.c ./manual/names.c ./manual/noeffect.c ./manual/null.c ./manual/only.c ./manual/order.c ./manual/palindrome.c ./manual/palindrome.h ./manual/refs.c ./manual/returned.c ./manual/rgb.c ./manual/rstring.c ./manual/rstring.h ./manual/sample.c ./manual/setChar.c ./manual/setname.c ./manual/setname.h ./manual/special.c ./manual/stack.c ./manual/sumsquares.c ./manual/switch.c ./manual/testpal.c ./manual/types.c ./manual/unique.c ./manual/usedef.c ./manual/bounds.c \
+ arraydims.expect arraydims.c \
+ moreBufferTests2/fixedArrayType.c oldstyle2.c \
+ divzero.expect parentype.expect \
+ divzero.c parentype.c \
+stringliteral.expect stringliteral.c