From 03d47b963acfa3e959da50749c336072f4334388 Mon Sep 17 00:00:00 2001 From: Simon Kagstrom Date: Sun, 29 Oct 2023 17:15:34 +0100 Subject: [PATCH] test: Revert to using class name, but ignore __CNT --- tests/tools/parse_cobertura.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tools/parse_cobertura.py b/tests/tools/parse_cobertura.py index 22007a30..f96c80b8 100755 --- a/tests/tools/parse_cobertura.py +++ b/tests/tools/parse_cobertura.py @@ -17,8 +17,8 @@ def lookupClassName(dom, name): tags = dom.getElementsByTagName('class') for tag in tags: - nameAttr = tag.attributes["filename"] - if nameAttr.value == name: + nameAttr = tag.attributes["name"] + if nameAttr.value.startswith(name): return tag return None @@ -49,6 +49,7 @@ def parseFile(filename): def hitsPerLine(dom, fileName, lineNr): + fileName = fileName.replace(".", "_").replace("-", "_") fileTag = lookupClassName(dom, fileName) if fileTag != None: