diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-11-20 08:43:17 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-11-27 14:15:40 -0800 |
commit | 014967ace3f79835ced79b0189d39eced1da7fa2 (patch) | |
tree | 89dc1d6155252198da61fb868c5c47ccef897df7 /Makefile.in | |
parent | de32a2d74948e13e4d8ec17263a31e2c3ae900b1 (diff) | |
download | zlib-014967ace3f79835ced79b0189d39eced1da7fa2.tar.gz |
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.in | 13 |
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 fi -@rm -f foo.gz +infcover.o: test/infcover.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/infcover.c + +infcover: infcover.o libz.a + $(CC) $(CFLAGS) -o $@ infcover.o libz.a + +cover: infcover + rm -f *.gcda + ./infcover + gcov inf*.c + libz.a: $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 @@ -230,10 +241,12 @@ clean: rm -f *.o *.lo *~ \ example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ example64$(EXE) minigzip64$(EXE) \ + infcover \ libz.* foo.gz so_locations \ _match.s maketree contrib/infback9/*.o rm -rf objs rm -f *.gcda *.gcno *.gcov + rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov maintainer-clean: distclean distclean: clean zconf zconf.h.cmakein docs |