aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--csv-test.c4
-rw-r--r--makefile12
2 files changed, 10 insertions, 6 deletions
diff --git a/csv-test.c b/csv-test.c
index ecf55cd..99325af 100644
--- a/csv-test.c
+++ b/csv-test.c
@@ -1,3 +1,5 @@
1#undef NDEBUG
2
1#include <stdio.h> 3#include <stdio.h>
2#include <stdlib.h> 4#include <stdlib.h>
3#include <string.h> 5#include <string.h>
@@ -6,8 +8,6 @@
6 8
7#include "csv.h" 9#include "csv.h"
8 10
9#undef NDEBUG
10
11#define FMEMOPEN(f, data) \ 11#define FMEMOPEN(f, data) \
12 f = fmemopen(data, sizeof(data)-1, "r"); \ 12 f = fmemopen(data, sizeof(data)-1, "r"); \
13 assert(f != NULL) 13 assert(f != NULL)
diff --git a/makefile b/makefile
index 38134b1..acf3564 100644
--- a/makefile
+++ b/makefile
@@ -2,9 +2,13 @@ include config.mk
2 2
3all: csv-test csv-perf seq-read 3all: csv-test csv-perf seq-read
4 4
5csv-test: csv-test.c csv.o csv.h 5csv-test: csv-test.c csv.c csv.h
6 $(CC) $(CFLAGS) -o $@ csv-test.c csv.o 6 $(CC) $(CFLAGS) -fprofile-instr-generate -fcoverage-mapping -DNDEBUG -o $@ csv-test.c csv.c
7 ./csv-test 7 ./$@
8
9coverage: csv-test
10 llvm-profdata merge -sparse default.profraw -o csv-test.profdata
11 llvm-cov show ./csv-test -instr-profile=csv-test.profdata
8 12
9csv-perf: csv-perf.c csv.o csv.h 13csv-perf: csv-perf.c csv.o csv.h
10 $(CC) $(CFLAGS) -o $@ csv-perf.c csv.o 14 $(CC) $(CFLAGS) -o $@ csv-perf.c csv.o
@@ -18,4 +22,4 @@ csv.o: csv.c csv.h
18clean: 22clean:
19 rm csv-test csv-perf seq-read csv.o 23 rm csv-test csv-perf seq-read csv.o
20 24
21.PHONY: all clean 25.PHONY: all clean coverage