summaryrefslogtreecommitdiff
path: root/tools/coverage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/coverage.sh')
-rwxr-xr-xtools/coverage.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/coverage.sh b/tools/coverage.sh
index 5caa6f0..95eef03 100755
--- a/tools/coverage.sh
+++ b/tools/coverage.sh
@@ -1,5 +1,10 @@
#!/bin/sh
+PROJ_ROOT=$(git rev-parse --show-toplevel)
+cd $PROJ_ROOT
+
+HTML_DIR=build/coverage/html
+
ctest --test-dir build/test -j8
-mkdir -p build/html
-gcovr --exclude-throw-branches --exclude build/_deps/ --exclude test -r source . --html-details build/html/gcovr_report.html
+mkdir -p ${HTML_DIR}
+gcovr --exclude-throw-branches --exclude build/_deps/ --exclude test -r . --html-details ${HTML_DIR}/gcovr_report.html