diff options
author | Dariusz Michaluk <d.michaluk@samsung.com> | 2024-04-05 12:15:39 +0200 |
---|---|---|
committer | Dariusz Michaluk <d.michaluk@samsung.com> | 2024-04-05 12:15:39 +0200 |
commit | 7a3f1411584edfa82cadc80b301f5e71c416a619 (patch) | |
tree | e6d93d89a1b9cc5f906048d289c3838df63fc19f | |
parent | 82da176964f94235fe11e5c6cd868f0a938871cf (diff) | |
download | key-manager-7a3f1411584edfa82cadc80b301f5e71c416a619.tar.gz key-manager-7a3f1411584edfa82cadc80b301f5e71c416a619.tar.bz2 key-manager-7a3f1411584edfa82cadc80b301f5e71c416a619.zip |
Adjust coverage script after lcov upgrade
Change-Id: I8d03eb3e0fc2092fb99bf5bf90fd037f1a9c3fe2
-rw-r--r-- | unit-tests/key-manager-coverage.sh.in | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/unit-tests/key-manager-coverage.sh.in b/unit-tests/key-manager-coverage.sh.in index 4b506ca7..17f23d53 100644 --- a/unit-tests/key-manager-coverage.sh.in +++ b/unit-tests/key-manager-coverage.sh.in @@ -25,14 +25,26 @@ 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@/unit-tests/*" -o $REPORT -lcov -r $REPORT "@CMAKE_BINARY_DIR@/common/*" -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@/unit-tests/*" -o $REPORT +lcov $IGNORE_ERRORS -r $REPORT "@CMAKE_BINARY_DIR@/common/*" -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 |