CI: Re-enable code coverage reporting for MSYS2 builds

It was disabled in !875 because lcov didn't support the new coverage
format produced by gcc9+. The latest lcov release in MSYS2 supports
it again, so re-enable everything.

lcov now writes native Windows paths to its output so adjust the path
fixup script to handle those.
This commit is contained in:
Christoph Reiter
2020-09-30 11:36:49 +02:00
parent d536afeed8
commit 7d1e782c65
2 changed files with 16 additions and 27 deletions

View File

@@ -1,6 +1,7 @@
import sys
import os
import io
import re
def main(argv):
@@ -12,11 +13,7 @@ def main(argv):
print("cov-fixup:", path)
text = io.open(path, "r", encoding="utf-8").read()
text = text.replace("\\\\", "/")
glib_dir = "/glib/"
end = text.index(glib_dir)
start = text[:end].rindex(":") + 1
old_root = text[start:end]
assert os.path.basename(os.getcwd()) == "glib"
old_root = re.search(":(.*?)/glib/.*?$", text, re.MULTILINE).group(1)
new_root = os.path.dirname(os.getcwd())
if old_root != new_root:
print("replacing %r with %r" % (old_root, new_root))