From a93f0afb5238be3f086659393602a01895070347 Mon Sep 17 00:00:00 2001 From: Benjamin Fuchs Date: Sun, 13 Nov 2016 12:50:42 +0100 Subject: [PATCH 1/4] Fix always FULLY COVERED --- git-coverage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-coverage b/git-coverage index 9c72607..f1af1f6 100755 --- a/git-coverage +++ b/git-coverage @@ -430,7 +430,7 @@ class GccCoverage: count = 0 else: count = int(covered) - coverage[no] = parts[2] + coverage[no] = parts[2] except ValueError: if search_any_re(self._skips, parts[2]): coverage[no] = parts[2] From fd508209ae874b65f5e25735f3a6a36c02008b8f Mon Sep 17 00:00:00 2001 From: Benjamin Fuchs Date: Mon, 14 Nov 2016 23:28:18 +0100 Subject: [PATCH 2/4] New try --- git-coverage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-coverage b/git-coverage index f1af1f6..114018e 100755 --- a/git-coverage +++ b/git-coverage @@ -19,7 +19,7 @@ SKIP_PATTERNS = [ def subprocess_lines(argv): proc = subprocess.Popen(argv, stdout=subprocess.PIPE) while True: - line = proc.stdout.readline() + line = proc.stdout.readline().replace("#","/") if line != "": yield line else: @@ -430,7 +430,7 @@ class GccCoverage: count = 0 else: count = int(covered) - coverage[no] = parts[2] + coverage[no] = parts[2] except ValueError: if search_any_re(self._skips, parts[2]): coverage[no] = parts[2] From 38a6a73c30ec177fea91ac15524a94388aa001cd Mon Sep 17 00:00:00 2001 From: Benjamin Fuchs Date: Wed, 16 Nov 2016 00:36:01 +0100 Subject: [PATCH 3/4] Fix + unlink files --- git-coverage | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-coverage b/git-coverage index 114018e..218e8d1 100755 --- a/git-coverage +++ b/git-coverage @@ -19,7 +19,7 @@ SKIP_PATTERNS = [ def subprocess_lines(argv): proc = subprocess.Popen(argv, stdout=subprocess.PIPE) while True: - line = proc.stdout.readline().replace("#","/") + line = proc.stdout.readline() if line != "": yield line else: @@ -399,6 +399,9 @@ class GccCoverage: if not match: continue gcov = match.group(1) + if gcov != "%s.gcov"%filename: + os.unlink(gcov) + continue if os.path.exists(gcov): gcovs.append(os.path.abspath(gcov)) From 55857d097aacb863add7a400a26c6a3f88f2fb7a Mon Sep 17 00:00:00 2001 From: Benjamin Fuchs Date: Sat, 19 Nov 2016 00:14:51 +0100 Subject: [PATCH 4/4] Fixing coverage of includes. --- git-coverage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-coverage b/git-coverage index 218e8d1..0ed5125 100755 --- a/git-coverage +++ b/git-coverage @@ -399,7 +399,7 @@ class GccCoverage: if not match: continue gcov = match.group(1) - if gcov != "%s.gcov"%filename: + if gcov != "*.gcov": os.unlink(gcov) continue if os.path.exists(gcov):