From a609a0d5e82a15ee43f71f0a19218c59e9556575 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sat, 27 Jun 2020 10:23:57 +0200 Subject: aktiviere Code-Coverage-Test --- makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 38134b1..acf3564 100644 --- a/makefile +++ b/makefile @@ -2,9 +2,13 @@ include config.mk all: csv-test csv-perf seq-read -csv-test: csv-test.c csv.o csv.h - $(CC) $(CFLAGS) -o $@ csv-test.c csv.o - ./csv-test +csv-test: csv-test.c csv.c csv.h + $(CC) $(CFLAGS) -fprofile-instr-generate -fcoverage-mapping -DNDEBUG -o $@ csv-test.c csv.c + ./$@ + +coverage: csv-test + llvm-profdata merge -sparse default.profraw -o csv-test.profdata + llvm-cov show ./csv-test -instr-profile=csv-test.profdata csv-perf: csv-perf.c csv.o csv.h $(CC) $(CFLAGS) -o $@ csv-perf.c csv.o @@ -18,4 +22,4 @@ csv.o: csv.c csv.h clean: rm csv-test csv-perf seq-read csv.o -.PHONY: all clean +.PHONY: all clean coverage -- cgit v1.3