summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-11-20 08:43:17 -0800
committerMark Adler <madler@alumni.caltech.edu>2011-11-27 14:15:40 -0800
commit014967ace3f79835ced79b0189d39eced1da7fa2 (patch)
tree89dc1d6155252198da61fb868c5c47ccef897df7 /Makefile.in
parentde32a2d74948e13e4d8ec17263a31e2c3ae900b1 (diff)
downloadzlib-014967ace3f79835ced79b0189d39eced1da7fa2.tar.gz
zlib-014967ace3f79835ced79b0189d39eced1da7fa2.tar.bz2
zlib-014967ace3f79835ced79b0189d39eced1da7fa2.zip
Test the inflate code with full coverage.
Add a cover target in Makefile and the test/infcover.c test program to cover all of the code lines in the inf*.c source files. The coverage is run with memory allocation checking in order to expose memory leaks. The coverage testing is run using: ./configure --cover && make cover
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index f349569..1d6a8c7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,17 @@ test64: all64
111 fi 111 fi
112 -@rm -f foo.gz 112 -@rm -f foo.gz
113 113
114infcover.o: test/infcover.c zlib.h zconf.h
115 $(CC) $(CFLAGS) -I. -c -o $@ test/infcover.c
116
117infcover: infcover.o libz.a
118 $(CC) $(CFLAGS) -o $@ infcover.o libz.a
119
120cover: infcover
121 rm -f *.gcda
122 ./infcover
123 gcov inf*.c
124
114libz.a: $(OBJS) 125libz.a: $(OBJS)
115 $(AR) $(ARFLAGS) $@ $(OBJS) 126 $(AR) $(ARFLAGS) $@ $(OBJS)
116 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 127 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
@@ -230,10 +241,12 @@ clean:
230 rm -f *.o *.lo *~ \ 241 rm -f *.o *.lo *~ \
231 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ 242 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
232 example64$(EXE) minigzip64$(EXE) \ 243 example64$(EXE) minigzip64$(EXE) \
244 infcover \
233 libz.* foo.gz so_locations \ 245 libz.* foo.gz so_locations \
234 _match.s maketree contrib/infback9/*.o 246 _match.s maketree contrib/infback9/*.o
235 rm -rf objs 247 rm -rf objs
236 rm -f *.gcda *.gcno *.gcov 248 rm -f *.gcda *.gcno *.gcov
249 rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
237 250
238maintainer-clean: distclean 251maintainer-clean: distclean
239distclean: clean zconf zconf.h.cmakein docs 252distclean: clean zconf zconf.h.cmakein docs