aboutsummaryrefslogtreecommitdiffstats
path: root/config-coverage-gcc.mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-07 15:10:57 +0200
committerMattias Andrée <maandree@kth.se>2022-07-07 15:10:57 +0200
commitc5db64788069abdea1ee5b05d0638263d9868196 (patch)
tree8dfa59be8831226ac0d425270e54351f1f70b57e /config-coverage-gcc.mk
parentSHA 2 => SHA-2 (diff)
downloadlibsha2-c5db64788069abdea1ee5b05d0638263d9868196.tar.gz
libsha2-c5db64788069abdea1ee5b05d0638263d9868196.tar.bz2
libsha2-c5db64788069abdea1ee5b05d0638263d9868196.tar.xz
Add coverage test
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--config-coverage-gcc.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/config-coverage-gcc.mk b/config-coverage-gcc.mk
new file mode 100644
index 0000000..18de147
--- /dev/null
+++ b/config-coverage-gcc.mk
@@ -0,0 +1,11 @@
+CONFIGFILE_PROPER = config.mk
+include $(CONFIGFILE_PROPER)
+
+CC = $(CC_PREFIX)gcc -std=c99
+GCOV = gcov
+
+CFLAGS = -g -O0 -pedantic -fprofile-arcs -ftest-coverage
+LDFLAGS = -lgcov -fprofile-arcs
+
+coverage: check
+ $(GCOV) -pr $(SRC) 2>&1