Fix code coverage documentation.
GN args don't work since debug build is not allowed with
static build and symbol_level=2. We shouldn't be using
debug build with code coverage config anyway, so correct
the set of gn flags. Also, format python code.
[email protected],[email protected]
Change-Id: I86b5a6041baaec2065ff553d9debd0e0f4249c1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1582269
Reviewed-by: Yuke Liao <[email protected]>
Reviewed-by: Max Moroz <[email protected]>
Commit-Queue: Abhishek Arya <[email protected]>
Cr-Commit-Position: refs/heads/master@{#653630}
diff --git a/tools/code_coverage/coverage.py b/tools/code_coverage/coverage.py
index 16e5f55..8d71110 100755
--- a/tools/code_coverage/coverage.py
+++ b/tools/code_coverage/coverage.py
@@ -14,8 +14,8 @@
* Example usage:
gn gen out/coverage \\
- --args='use_clang_coverage=true is_component_build=false \\
- dcheck_always_on=true'
+ --args="use_clang_coverage=true is_component_build=false\\
+ is_debug=false dcheck_always_on=true"
gclient runhooks
python tools/code_coverage/coverage.py crypto_unittests url_unittests \\
-b out/coverage -o out/report -c 'out/coverage/crypto_unittests' \\
@@ -166,6 +166,7 @@
'both \'%s\' and \'%s\' exist.') % (
LLVM_COV_PATH, LLVM_PROFDATA_PATH)
+
def _GetPathWithLLVMSymbolizerDir():
"""Add llvm-symbolizer directory to path for symbolized stacks."""
path = os.getenv('PATH')
@@ -190,7 +191,6 @@
return _GetTargetOS() == 'ios'
-
def _GeneratePerFileLineByLineCoverageInHtml(binary_paths, profdata_file_path,
filters, ignore_filename_regex):
"""Generates per file line-by-line coverage in html using 'llvm-cov show'.