From 34a74eba09f61c4e83cd8ee5304122030eeff264 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 1 Oct 2017 16:05:41 +0200 Subject: [PATCH] Fixed code coverage checking Fixed #47 The manual was missing the `-fcoverage-mapping` option, of course we didn't have coverage data... Also changed `llvm-cov` to `llvm-cov-3.8` on tests/coverage.sh: some systems don't have the versionless alias. --- README.md | 2 +- tests/coverage.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fddc82f..d8655fa 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ You can run the test suite under clang sanitizers or valgrind: You can also check code coverage: $ make clean - $ make test CC="clang -std=c99" CFLAGS="-fprofile-instr-generate" + $ make test CC="clang -std=c99" CFLAGS="-fprofile-instr-generate -fcoverage-mapping" $ tests/coverage.sh diff --git a/tests/coverage.sh b/tests/coverage.sh index a802025..9bf5bc9 100755 --- a/tests/coverage.sh +++ b/tests/coverage.sh @@ -1,4 +1,4 @@ #! /bin/sh llvm-profdata-3.8 merge default.profraw -o all.profdata -llvm-cov show "./test.out" -instr-profile=all.profdata +llvm-cov-3.8 show -instr-profile=all.profdata "./test.out" -- 2.47.3