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

Unified Diff: tools/llvm_coverage_run.py

Issue 1239803002: llvm-coverage script: respect SKIA_OUT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 5 years, 5 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/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(
« 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