aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/coverage-info.py
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /build/scripts/coverage-info.py
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
downloadydb-397cbe258b9e064f49c4ca575279f02f39fef76e.tar.gz
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/coverage-info.py')
-rw-r--r--build/scripts/coverage-info.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/build/scripts/coverage-info.py b/build/scripts/coverage-info.py
index 94491d92564..365a97a3682 100644
--- a/build/scripts/coverage-info.py
+++ b/build/scripts/coverage-info.py
@@ -201,20 +201,20 @@ def process_all_coverage_files(gcda_archive, fname2gcno, fname2info, geninfo_exe
gen_info(geninfo_cmd, coverage_info)
-def gen_cobertura(tool, output, combined_info):
- cmd = [
- tool,
- combined_info,
- '-b', '#hamster#',
- '-o', output
- ]
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out, err = p.communicate()
- if p.returncode:
- raise Exception('lcov_cobertura failed with exit code {}\nstdout: {}\nstderr: {}'.format(p.returncode, out, err))
-
-
-def main(source_root, output, gcno_archive, gcda_archive, gcov_tool, prefix_filter, exclude_regexp, teamcity_stat_output, coverage_report_path, gcov_report, lcov_cobertura):
+def gen_cobertura(tool, output, combined_info):
+ cmd = [
+ tool,
+ combined_info,
+ '-b', '#hamster#',
+ '-o', output
+ ]
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ if p.returncode:
+ raise Exception('lcov_cobertura failed with exit code {}\nstdout: {}\nstderr: {}'.format(p.returncode, out, err))
+
+
+def main(source_root, output, gcno_archive, gcda_archive, gcov_tool, prefix_filter, exclude_regexp, teamcity_stat_output, coverage_report_path, gcov_report, lcov_cobertura):
exclude_files = re.compile(exclude_regexp) if exclude_regexp else None
fname2gcno = {}
@@ -256,8 +256,8 @@ def main(source_root, output, gcno_archive, gcda_archive, gcov_tool, prefix_filt
cmd = [os.path.join(source_root, 'devtools', 'lcov', 'genhtml'), '-p', source_root, '--ignore-errors', 'source', '-o', output_dir, output_trace]
print >>sys.stderr, '## genhtml', ' '.join(cmd)
subprocess.check_call(cmd)
- if lcov_cobertura:
- gen_cobertura(lcov_cobertura, gcov_report, output_trace)
+ if lcov_cobertura:
+ gen_cobertura(lcov_cobertura, gcov_report, output_trace)
with tarfile.open(output, 'w') as tar:
tar.add(output_dir, arcname='.')
@@ -275,8 +275,8 @@ if __name__ == '__main__':
parser.add_argument('--exclude-regexp', action='store')
parser.add_argument('--teamcity-stat-output', action='store_const', const=True)
parser.add_argument('--coverage-report-path', action='store')
- parser.add_argument('--gcov-report', action='store')
- parser.add_argument('--lcov-cobertura', action='store')
+ parser.add_argument('--gcov-report', action='store')
+ parser.add_argument('--lcov-cobertura', action='store')
args = parser.parse_args()
main(**vars(args))