summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2023-02-03 15:42:19 +0000
committerSimon McVittie <smcv@debian.org>2023-02-03 15:46:21 +0000
commita929c4c12375817954bfaedb8ea13568fcbb8b11 (patch)
tree43e6043e32b7e6d194719b0a8b8fe6f3815893eb
parent47242308957afa7fb1f631e13a9049e9864862a7 (diff)
downloadaccountsservice-a929c4c12375817954bfaedb8ea13568fcbb8b11.tar.gz
CI: Pass --gcov-ignore-parse-errors to gcovr
Workaround for https://github.com/gcovr/gcovr/issues/710 and similar bugs. Because Meson invokes gcovr internally, it doesn't seem to be possible to add options any other way. Signed-off-by: Simon McVittie <smcv@debian.org>
-rwxr-xr-x.ci/gcovr3
-rwxr-xr-x.ci/run-tests.sh5
2 files changed, 8 insertions, 0 deletions
diff --git a/.ci/gcovr b/.ci/gcovr
new file mode 100755
index 0000000..253e918
--- /dev/null
+++ b/.ci/gcovr
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Workaround for https://github.com/gcovr/gcovr/issues/710
+exec /usr/bin/gcovr --gcov-ignore-parse-errors "$@"
diff --git a/.ci/run-tests.sh b/.ci/run-tests.sh
index 93d616b..70c0ca0 100755
--- a/.ci/run-tests.sh
+++ b/.ci/run-tests.sh
@@ -6,6 +6,11 @@ SRCDIR=`pwd`
cd /home/user
cp -r $SRCDIR ./
cd "${CI_PROJECT_NAME}"
+
+# Workaround for https://github.com/gcovr/gcovr/issues/710: replace gcovr
+# with a wrapper that adds --gcov-ignore-parse-errors
+export PATH="$(pwd)/.ci:$PATH"
+
meson setup --localstatedir /var -Db_coverage=true _build
# FIXME until we can figure out how to depend on mocklibc being built for the tests
meson compile -C _build