Skip to content

Commit 0a9fe0b

Browse files
committed
ci: guard empty coverage report sections
1 parent 2684c6d commit 0a9fe0b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/measure-tls-coverage.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ jobs:
9090
9191
text = Path("all-missing-lines.txt").read_text(encoding="utf-8")
9292
sections = re.split(r"(?=^/.*:$)", text, flags=re.MULTILINE)
93-
selected = [section.rstrip() for section in sections if marker in section.splitlines()[0]]
93+
selected = []
94+
for section in sections:
95+
section_lines = section.splitlines()
96+
if section_lines and marker in section_lines[0]:
97+
selected.append(section.rstrip())
9498
if not selected:
9599
raise SystemExit("no TLS source sections found in llvm-cov text report")
96100
Path("tls-missing-lines.txt").write_text(

0 commit comments

Comments
 (0)