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

Unified Diff: build/scripts/slave/chromium/process_coverage.py

Issue 11273046: Goal here is to collect total_coverage and unittests coverage numbers separately. Below are the ste… (Closed) Base URL: https://src.chromium.org/chrome/trunk/tools/
Patch Set: Created 8 years, 1 month 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
Index: build/scripts/slave/chromium/process_coverage.py
===================================================================
--- build/scripts/slave/chromium/process_coverage.py (revision 163846)
+++ build/scripts/slave/chromium/process_coverage.py (working copy)
@@ -80,23 +80,40 @@
"""
target_dir = os.path.join(os.path.dirname(options.build_dir),
'out', options.target)
+ if os.path.exists(os.path.join(target_dir, 'total_coverage')):
+ print 'total_coverage directory exists'
+ total_cov_file = os.path.join(target_dir, 'total_coverage', 'coverage.info')
+ cmdline = [
+ sys.executable,
+ 'src/tools/code_coverage/croc.py',
+ '-c', 'src/build/common.croc',
+ '-c', 'src/build/linux/chrome_linux.croc',
+ '-i', total_cov_file,
+ '-r', os.getcwd(),
+ '--tree',
+ '--html',
+ os.path.join(target_dir, 'total_coverage', 'coverage_croc_html'),
+ ]
+ main_common(total_cov_file, cmdline)
- cov_file = os.path.join(target_dir, 'coverage.info')
+ if os.path.exists(os.path.join(target_dir, 'unittests_coverage')):
+ print 'unittests_coverage directory exists'
+ unittests_cov_file = os.path.join(target_dir, 'unittests_coverage', 'coverage.info')
+ cmdline = [
+ sys.executable,
+ 'src/tools/code_coverage/croc.py',
+ '-c', 'src/build/common.croc',
+ '-c', 'src/build/linux/chrome_linux.croc',
+ '-i', unittests_cov_file,
+ '-r', os.getcwd(),
+ '--tree',
+ '--html',
+ os.path.join(target_dir, 'unittests_coverage', 'coverage_croc_html'),
+ ]
+ main_common(unittests_cov_file, cmdline)
+ return
cmp 2012/11/05 21:26:35 I assume main_common returns something useful. If
pshenoy 2012/11/05 21:52:14 Done. Not sure how do I return the result of previ
cmp 2012/11/05 21:59:29 There are a couple approaches: - add result values
pshenoy 2012/11/05 22:22:23 Thanks. Done.
- cmdline = [
- sys.executable,
- 'src/tools/code_coverage/croc.py',
- '-c', 'src/build/common.croc',
- '-c', 'src/build/linux/chrome_linux.croc',
- '-i', cov_file,
- '-r', os.getcwd(),
- '--tree',
- '--html', os.path.join(target_dir, 'coverage_croc_html'),
- ]
- return main_common(cov_file, cmdline)
-
-
def main_win(options, args):
"""Print appropriate size information about built Windows targets.

Powered by Google App Engine
This is Rietveld 408576698