Skip to content

Commit 6723889

Browse files
committed
revert changes in coverage_utils; remove warning lines in save
1 parent 3af5fdf commit 6723889

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

experiment/measurer/coverage_utils.py

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,17 @@ def generate_coverage_summary_json(self):
150150
def generate_coverage_report(self):
151151
"""Generates the coverage report and stores in bucket."""
152152
command = [
153-
'llvm-cov', 'show', '-format=html',
153+
'llvm-cov',
154+
'show',
155+
'-format=html',
154156
f'-path-equivalence=/,{self.source_files_dir}',
155-
f'-output-dir={self.report_dir}', '-Xdemangler', 'c++filt',
156-
'-Xdemangler', '-n', self.binary_file,
157-
f'-instr-profile={self.merged_profdata_file}'
157+
f'-output-dir={self.report_dir}',
158+
'-Xdemangler',
159+
'c++filt',
160+
'-Xdemangler',
161+
'-n',
162+
self.binary_file,
163+
f'-instr-profile={self.merged_profdata_file}',
158164
]
159165
result = new_process.execute(command, expect_zero=False)
160166
if result.retcode != 0:
@@ -258,9 +264,14 @@ def generate_json_summary(coverage_binary,
258264
"""Generates the json summary file from |coverage_binary|
259265
and |profdata_file|."""
260266
command = [
261-
'llvm-cov', 'export', '-format=text', '-num-threads=1',
262-
'-region-coverage-gt=0', '-skip-expansions', coverage_binary,
263-
f'-instr-profile={profdata_file}'
267+
'llvm-cov',
268+
'export',
269+
'-format=text',
270+
'-num-threads=1',
271+
'-region-coverage-gt=0',
272+
'-skip-expansions',
273+
coverage_binary,
274+
f'-instr-profile={profdata_file}',
264275
]
265276

266277
if summary_only:

experiment/measurer/measure_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,8 @@ def measure_snapshot_coverage( # pylint: disable=too-many-locals
626626

627627
with gzip.open(str(coverage_archive_zipped), 'wb') as compressed:
628628
with open(snapshot_measurer.cov_summary_file, 'rb') as uncompressed:
629-
compressed.write(uncompressed.read())
629+
# avoid saving warnings so we can direct import with pandas
630+
compressed.write(uncompressed.readlines()[-1])
630631

631632
coverage_archive_dst = exp_path.filestore(coverage_archive_zipped)
632633
if filestore_utils.cp(coverage_archive_zipped,

0 commit comments

Comments
 (0)