Walk through files in parse_llvm_coverage.py instead of using 'git ls-files'
The script will be executed on a swarming bot where we do not want to isolate .git directories. BUG=skia:5159 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888423002 NOTREECHECKS=true Review URL: https://codereview.chromium.org/1888423002
This commit is contained in:
parent
43e8f67254
commit
5f80e8cb7c
@ -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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user