test/coverage: skip demangle step

This commit is contained in:
Matthias Ringwald 2022-03-11 22:53:47 +01:00
parent 1d3bd1e51c
commit a48967ee37
2 changed files with 0 additions and 27 deletions

View File

@ -121,8 +121,6 @@ coverage-unit.info: subdirs-coverage
$(MAKE) subdirs-coverage
# collect traces
lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit.info
# demangle
python3 coverage_demangle.py coverage-unit.info
coverage-unit-ble.info: subdirs-coverage-ble
# delete trace data
@ -131,8 +129,6 @@ coverage-unit-ble.info: subdirs-coverage-ble
$(MAKE) subdirs-coverage-ble
# collect traces
lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit-ble.info
# demangle
python3 coverage_demangle.py coverage-unit-ble.info
coverage-ble.info: coverage-pts.info coverage-sm-sc.info coverage-unit-ble.info

View File

@ -1,23 +0,0 @@
#!/usr/bin/env python3
#
# Demangle C++ function names in lcov .info reports
#
# Copyright 2020 BlueKitchen GmbH
#
import cxxfilt
import fileinput
import sys
import re
for line in fileinput.input(inplace=1):
match = re.match('(FN|FNDA):(\d.*),(\w*)', line)
if match:
(key, line_no, mangled) = match.groups()
demangled = cxxfilt.demangle(mangled)
match = re.match('(\w+)\(.*\)', demangled)
if (match):
fn = match.groups()[0]
sys.stdout.write('%s:%s,%s\n' % (key, line_no, fn))
continue
sys.stdout.write(line)