aboutsummaryrefslogtreecommitdiff
path: root/ci/common/test.sh
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-02-06 21:20:45 -0500
committerJames McCoy <jamessan@jamessan.com>2018-02-06 23:23:59 -0500
commit9fdd5d7f033941f28bd22b5a0f8c44e96e4dd3ef (patch)
tree2744319c1be9efc95a713cb5e840f2404565041a /ci/common/test.sh
parent6e2bb564e15f69f88f0bd73c7f6eaa9b1dc2eff3 (diff)
downloadrneovim-9fdd5d7f033941f28bd22b5a0f8c44e96e4dd3ef.tar.gz
rneovim-9fdd5d7f033941f28bd22b5a0f8c44e96e4dd3ef.tar.bz2
rneovim-9fdd5d7f033941f28bd22b5a0f8c44e96e4dd3ef.zip
codecov: Submit test suite specific coverage
Diffstat (limited to 'ci/common/test.sh')
-rw-r--r--ci/common/test.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/ci/common/test.sh b/ci/common/test.sh
index 1cb3a6224b..bc80dfead7 100644
--- a/ci/common/test.sh
+++ b/ci/common/test.sh
@@ -1,6 +1,15 @@
. "${CI_DIR}/common/build.sh"
. "${CI_DIR}/common/suite.sh"
+submit_coverage() {
+ if [ -n "${GCOV}" ]; then
+ if curl --fail --output codecov.bash --silent https://codecov.io/bash; then
+ bash codecov.bash -c -F "$1" || echo "codecov upload failed."
+ rm -f codecov.bash
+ fi
+ fi
+}
+
print_core() {
local app="$1"
local core="$2"
@@ -82,6 +91,7 @@ run_unittests() {(
if ! build_make unittest ; then
fail 'unittests' F 'Unit tests failed'
fi
+ submit_coverage unittest
check_core_dumps "$(which luajit)"
exit_suite
)}
@@ -92,6 +102,7 @@ run_functionaltests() {(
if ! build_make ${FUNCTIONALTEST}; then
fail 'functionaltests' F 'Functional tests failed'
fi
+ submit_coverage functionaltest
asan_check "${LOG_DIR}"
valgrind_check "${LOG_DIR}"
check_core_dumps
@@ -105,6 +116,7 @@ run_oldtests() {(
reset
fail 'oldtests' F 'Legacy tests failed'
fi
+ submit_coverage oldtest
asan_check "${LOG_DIR}"
valgrind_check "${LOG_DIR}"
check_core_dumps