summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjvoisin2020-07-21 12:12:39 +0200
committerjvoisin2020-07-21 12:12:39 +0200
commit0ef6522c8892dacafb95c5dcc8889ed82c00a790 (patch)
treed88b1031ca8691e8ee1368da6d6d88a62f6d261d /Makefile
parentb90e0ecc6b0717786ae72236c37157f1b5983521 (diff)
Fix `make coverage`
Diffstat (limited to '')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index db5878e..4520875 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ coverage: ## compile snuffleugpaus, and run the testsuite with coverage
27ifeq ($(CC),clang) 27ifeq ($(CC),clang)
28 cd src; CFLAGS="-fprofile-instr-generate -fcoverage-mapping" ./configure --enable-snuffleupagus 28 cd src; CFLAGS="-fprofile-instr-generate -fcoverage-mapping" ./configure --enable-snuffleupagus
29 make -C src 29 make -C src
30 sed -i "s/\$$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" src/run-tests.php
30 LLVM_PROFILE_FILE="sp_%p_%m.profraw" TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test 31 LLVM_PROFILE_FILE="sp_%p_%m.profraw" TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test
31 llvm-profdata-4.0 merge ./src/*.profraw -o ./src/sp.profdata 32 llvm-profdata-4.0 merge ./src/*.profraw -o ./src/sp.profdata
32 llvm-cov report -instr-profile=./src/sp.profdata ./src/modules/snuffleupagus.so 33 llvm-cov report -instr-profile=./src/sp.profdata ./src/modules/snuffleupagus.so
@@ -34,6 +35,7 @@ else
34 cd src; ./configure --enable-snuffleupagus --enable-coverage 35 cd src; ./configure --enable-snuffleupagus --enable-coverage
35 make -C src 36 make -C src
36 rm -Rf src/COV.html 37 rm -Rf src/COV.html
38 sed -i "s/\$$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" src/run-tests.php
37 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test 39 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test
38 lcov --base-directory ./src --directory ./src -c -o ./src/COV.info --rc lcov_branch_coverage=1 40 lcov --base-directory ./src --directory ./src -c -o ./src/COV.info --rc lcov_branch_coverage=1
39 lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1 41 lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1