Chromium Code Reviews| 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. |