From: Adeel Kazmi Date: Thu, 13 Feb 2020 09:55:58 +0000 (+0000) Subject: (patch-coverage.pl) Ignore header files that yield no coverage X-Git-Tag: dali_1.5.0~1^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=5eafd00d6f3e6008ff71fa747607cc4f23483743;hp=30f34e317e33abd5f6926cc418584a4f8d0c60fc (patch-coverage.pl) Ignore header files that yield no coverage Change-Id: I8e1fe875d300fa028bd2f6844422a4fd38f6d3ad --- diff --git a/automated-tests/patch-coverage.pl b/automated-tests/patch-coverage.pl index 5e5e164..c5d9083 100755 --- a/automated-tests/patch-coverage.pl +++ b/automated-tests/patch-coverage.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright (c) 2016 Samsung Electronics Co., Ltd. +# Copyright (c) 2020 Samsung Electronics Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -266,6 +266,12 @@ sub get_coverage if(index( $source_file, $file ) > 0 ) { $gcovfile = $coverage_file; + # Some header files do not produce an equivalent gcov file so we shouldn't parse them + if(($source_file =~ /\.h$/) && (! -e $gcovfile)) + { + print "Omitting Header: $source_file\n" if $debug; + $gcovfile = "" + } last; } }