diff options
author | rmistry <rmistry@google.com> | 2016-04-18 04:18:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-18 04:18:56 -0700 |
commit | 5f80e8cb7cfb83a69d478861f01ea8e965fcd448 (patch) | |
tree | 0e984dc943d5fddecc864c02e87a7bcf14cb40ef | |
parent | 43e8f6725457a70bbadf7cba82fd162960464b99 (diff) |
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
-rwxr-xr-x | tools/parse_llvm_coverage.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/parse_llvm_coverage.py b/tools/parse_llvm_coverage.py index f721bd5078..5569fadac9 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 = [] |