Index: tools/llvm_coverage_run.py |
diff --git a/tools/llvm_coverage_run.py b/tools/llvm_coverage_run.py |
index 676e670fcf991698c2212b4e4b208c74ad161723..00641ca61af1fa17f8ac01a5f4893b1de5143371 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( |