Commit 35e24d1f authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

In "", added TODO about broken regex on Windows.

parent a567c866
Pipeline #93524 failed with stages
in 2 minutes and 20 seconds
......@@ -11,6 +11,10 @@ import xml.etree.ElementTree as ET
import os
import re
# Use Unix path separators because this script is usually run in a Bash-context.
# And Bash fails with Windows path separators which are introduced by os.path.join(...)
path_separator = "/"
def get_modules_from_pom_file(filename="pom.xml"):
"""Return a list of submodules which where found in passed "pom.xml"."""
......@@ -33,14 +37,15 @@ def extract_line_and_branch_coverage(module_names):
module_to_coverage = dict()
default_coverage_file = os.path.join("target", "coverage-reports", "index.html")
default_coverage_file = path_separator.join(["target", "coverage-reports", "index.html"])
for module in module_names:
coverage_path = os.path.join(module, default_coverage_file)
coverage_path = path_separator.join([module, default_coverage_file])
with open(coverage_path, "r") as file:
coverage_report =
# TODO: Regex seems be be broken on Windows CI worker. Find out why!
regex_pattern = re.compile(r"Total.*?([0-9]{1,3})\s?%.*?([0-9]{1,3})\s?%")
match =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment