Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: tools/parse_llvm_coverage.py

Issue 1888423002: Walk through files in parse_llvm_coverage.py instead of using 'git ls-files' (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Initial upload Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/parse_llvm_coverage.py
diff --git a/tools/parse_llvm_coverage.py b/tools/parse_llvm_coverage.py
index f721bd50781f7bcc154d691ea0d6153c17a983a4..5569fadac98754e0c30100b6ac3506f37f077791 100755
--- a/tools/parse_llvm_coverage.py
+++ b/tools/parse_llvm_coverage.py
@@ -59,7 +59,16 @@ def _get_per_file_per_line_coverage(report):
Values are lists which take the form (lineno, coverage, code).
"""
- all_files = subprocess.check_output(['git', 'ls-files']).splitlines()
+ all_files = []
+ for root, dirs, files in os.walk(os.getcwd()):
+ if 'third_party/externals' in root:
+ continue
+ files = [f for f in files if not (f[0] == '.' or f.endswith('.pyc'))]
+ dirs[:] = [d for d in dirs if not d[0] == '.']
+ for name in files:
+ all_files.append(os.path.join(root[(len(os.getcwd()) + 1):], name))
+ all_files.sort()
+
lines = report.splitlines()
current_file = None
file_lines = []
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698