aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-07 13:54:49 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-07 13:56:59 -0700
commit124114c0a8add705d4c3affb6f602b0a36eb4237 (patch)
treef820133b5e4a38579a026ed4f5ebe00ccf7b0493 /etc
parentb02a4341a9214cc57587c300171824d79b346913 (diff)
downloadnng-124114c0a8add705d4c3affb6f602b0a36eb4237.tar.gz
nng-124114c0a8add705d4c3affb6f602b0a36eb4237.tar.bz2
nng-124114c0a8add705d4c3affb6f602b0a36eb4237.zip
Richer CI support on Travis, including code coverage.
We use codecov.io; this seems to work well.
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