(stderr, expected_paths)
| 254 | |
| 255 | |
| 256 | def validate_native_errors(stderr, expected_paths): |
| 257 | found = set() |
| 258 | for line in stderr.splitlines(): |
| 259 | if line.startswith("coverage child fixture failed:") or line.startswith("coverage profile write failed:"): |
| 260 | raise Infrastructure("native fixture or normal-parent coverage failed") |
| 261 | if line.startswith("LLVM Profile Error:"): |
| 262 | match = re.fullmatch(r'LLVM Profile Error: Failed to write file "(.*)": (.+)', line) |
| 263 | if not match: |
| 264 | raise Infrastructure("unknown LLVM diagnostic precondition") |
| 265 | path = os.path.normpath(match.group(1)) |
| 266 | if path not in expected_paths: |
| 267 | raise Infrastructure("LLVM write failure did not name an owned obstacle") |
| 268 | found.add(path) |
| 269 | if found != expected_paths: |
| 270 | raise Infrastructure("intended genuine LLVM write failure was not observed") |
| 271 | |
| 272 | |
| 273 | def exact_positive_count(text, function): |
no test coverage detected