[js-code-coverage] Merge all istanbul reports into one
The istanbul subdirectory contains all the individual coverage reports
that were generated by v8-to-istanbul. Merge them all together into a
single coverage report to enable post processing to happen before
generating a report.
The report function in nyc implicitly merges all the reports together
but as part of generating the report it is ideal to exclude lines that
are blank or entirely comments to avoid an inflated coverage line count.
This can only be achieved by merging all the reports together first.
Bug: 1211595
Test: Running ./merge_results.py turning on coverage for WebUI tests
Change-Id: I48c3a72f9f4ac558d1abb5b4c6038e0928be03d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2963806
Commit-Queue: Ben Reich <[email protected]>
Auto-Submit: Ben Reich <[email protected]>
Reviewed-by: Zhaoyang Li <[email protected]>
Reviewed-by: Tibor Goldschwendt <[email protected]>
Cr-Commit-Position: refs/heads/master@{#897225}
diff --git a/third_party/js_code_coverage/coverage_modules.py b/third_party/js_code_coverage/coverage_modules.py
new file mode 100755
index 0000000..889027f2
--- /dev/null
+++ b/third_party/js_code_coverage/coverage_modules.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+# Copyright 2021 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+
+def PathToNyc():
+ return os.path.join(
+ os.path.dirname(__file__), 'node_modules', 'nyc', 'bin', 'nyc')