aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/codecov.sh10
-rwxr-xr-xetc/coverage.sh23
2 files changed, 33 insertions, 0 deletions
diff --git a/etc/codecov.sh b/etc/codecov.sh
new file mode 100755
index 00000000..58ce44fc
--- /dev/null
+++ b/etc/codecov.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ "${COVERAGE}" != ON ]
+then
+ echo "Code coverage not enabled."
+ exit 0
+fi
+
+bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage"
+echo 0
diff --git a/etc/coverage.sh b/etc/coverage.sh
new file mode 100755
index 00000000..5afc0979
--- /dev/null
+++ b/etc/coverage.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ "${COVERAGE}" != ON ]
+then
+ echo "Code coverage not enabled."
+ exit 0
+fi
+
+# capture all coverage info
+lcov --directory . --capture --output-file coverage.info || exit 1
+
+# filter out system information (C++ templates & inlines)
+lcov --remove coverage.info '/usr/*' --output-file coverage.info || exit 1
+
+# filter out the *test* program data
+lcov --remove coverage.info '*/tests/*' --output-file coverage.info || exit 1
+
+# emit debug stats.
+lcov --list coverage.info
+
+rm coverage.info
+
+echo 0