summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDariusz Michaluk <d.michaluk@samsung.com>2024-04-05 11:51:56 +0200
committerDariusz Michaluk <d.michaluk@samsung.com>2024-04-05 12:03:37 +0200
commita6236da7b4a0707bc3724501a7b44c4293498d93 (patch)
treeb3777dfab8282da92672f21e99c0f18e8cdf5f21
parentce5223f66589af4fe84625c5cd13a6aa0b8bc2dd (diff)
downloadyaca-tizen.tar.gz
yaca-tizen.tar.bz2
yaca-tizen.zip
Adjust coverage script after lcov upgradetizen
Change-Id: Id36cf60aa5cc7677ca71f66fab206eb9d835657c
-rw-r--r--tests/yaca-coverage.sh.in20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/yaca-coverage.sh.in b/tests/yaca-coverage.sh.in
index dc8e254..90cc7a7 100644
--- a/tests/yaca-coverage.sh.in
+++ b/tests/yaca-coverage.sh.in
@@ -25,13 +25,25 @@ cp -r "@COVERAGE_BUILD_DIR@"/* "@COVERAGE_DIR@"
# prepare report
rm -f $STDERR
-lcov --no-external -c -d "@COVERAGE_DIR@" -b "@CMAKE_BINARY_DIR@" -o $REPORT 2>$STDERR
-lcov -r $REPORT "@CMAKE_BINARY_DIR@/tests/*" -o $REPORT
-# check warnings
+# Due to mismatch in the version of gcc/gcov and lcov, we need to ignore few errors
+IGNORE_ERRORS=" --ignore-errors unused,unused \
+ --ignore-errors empty,empty \
+ --ignore-errors mismatch,mismatch \
+ --ignore-errors gcov,gcov "
+
+lcov $IGNORE_ERRORS --no-external -c -d "@COVERAGE_DIR@" -b "@CMAKE_BINARY_DIR@" -o $REPORT 2>$STDERR
+lcov $IGNORE_ERRORS -r $REPORT "@CMAKE_BINARY_DIR@/tests/*" -o $REPORT
+
+# Let's skip lcov warning
+# geninfo: WARNING: using JSON module "JSON::PP" - which is much slower than some alternatives.
+# Consider installing one of JSON::XS or Cpanel::JSON::XS
+sed -i '/WARNING/d' $STDERR
+
+# check errors
if [ -s $STDERR ]
then
- echo "Warnings detected (see $STDERR). Aborting."
+ echo "Errors detected (see $STDERR). Aborting."
exit 1
fi