diff options
author | borenet <borenet@google.com> | 2015-07-15 07:43:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-15 07:43:06 -0700 |
commit | f0c84407ae12e0483af26881ec9e22de97563fef (patch) | |
tree | e193f7fee0ad66930b81f47a0468b98094844997 /tools | |
parent | fd9a6a227b269f23fb5b353318f1d3a667617329 (diff) |
llvm-coverage script: respect SKIA_OUT
NOTRY=true
BUG=skia:2430
Review URL: https://codereview.chromium.org/1239803002
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/llvm_coverage_run.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/llvm_coverage_run.py b/tools/llvm_coverage_run.py index 676e670fcf..00641ca61a 100755 --- a/tools/llvm_coverage_run.py +++ b/tools/llvm_coverage_run.py @@ -17,9 +17,9 @@ import sys BUILDTYPE = 'Coverage' -OUT_DIR = os.path.realpath(os.path.join('out', BUILDTYPE)) PROFILE_DATA = 'default.profraw' PROFILE_DATA_MERGED = 'prof_merged' +SKIA_OUT = 'SKIA_OUT' def _fix_filename(filename): @@ -67,13 +67,19 @@ def _filter_results(results): return filtered +def _get_out_dir(): + """Determine the location for compiled binaries.""" + return os.path.join(os.environ.get(SKIA_OUT, os.path.realpath('out')), + BUILDTYPE) + + def run_coverage(cmd): """Run the given command and return per-file coverage data. Assumes that the binary has been built using llvm_coverage_build and that LLVM 3.6 or newer is installed. """ - binary_path = os.path.join(OUT_DIR, cmd[0]) + binary_path = os.path.join(_get_out_dir(), cmd[0]) subprocess.call([binary_path] + cmd[1:]) try: subprocess.check_call( |