From 48dc7347fccadce5f929b5c8ee8f53d703f8b336 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 22 Apr 2013 02:10:41 +0200 Subject: [PATCH] Add coverage check --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 640cde8..9df6cc3 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,16 @@ bench: $(FILES) src/bench.c $(OBJS) tests: $(FILES) src/tests.c $(OBJS) $(CC) -std=c99 $(CFLAGS) $(CFLAGS_EXTRA) -DVERIFY -fstack-protector-all -O2 -ggdb3 src/tests.c $(OBJS) $(LDFLAGS_EXTRA) -o tests +coverage: $(FILES) src/tests.c $(OBJS) + rm -rf tests.gcno tests.gcda tests_cov + $(CC) -std=c99 $(CFLAGS) $(CFLAGS_EXTRA) -DVERIFY --coverage -fstack-protector-all -O2 -ggdb3 src/tests.c $(OBJS) $(LDFLAGS_EXTRA) -o tests_cov + rm -rf lcov + mkdir -p lcov + cd lcov; lcov --directory ../ --zerocounters + cd lcov; ../tests_cov + cd lcov; lcov --directory ../ --capture --output-file secp256k1.info + cd lcov; genhtml -o . secp256k1.info + libsecp256k1.a: obj/secp256k1.o $(OBJS) $(AR) -rs $@ $(OBJS) obj/secp256k1.o