From: Dariusz Michaluk Date: Fri, 5 Apr 2024 10:41:40 +0000 (+0200) Subject: Adjust coverage script after lcov upgrade X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11f154fc5e756b31f88fa73ce46f18ba8f371b51;p=platform%2Fcore%2Fsecurity%2Faskuser.git Adjust coverage script after lcov upgrade Change-Id: I2fb6420ac6bc2f8482e1a8b8980ce649c9957429 --- diff --git a/test/unit-tests/askuser-notification-coverage.sh.in b/test/unit-tests/askuser-notification-coverage.sh.in index 79632d5..32d485b 100644 --- a/test/unit-tests/askuser-notification-coverage.sh.in +++ b/test/unit-tests/askuser-notification-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@/test/unit-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@/test/*" -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