(stdout, tests)
| 189 | |
| 190 | |
| 191 | def validate_test_output(stdout, tests): |
| 192 | clean = ANSI.sub("", stdout) |
| 193 | rows = re.findall(r"(?m)^ ([A-Za-z_][A-Za-z0-9_]*)[ \t]+(PASS|FAIL|SKIP)\b", clean) |
| 194 | starts = re.findall(r"(?m)^ (coverage_[A-Za-z0-9_]+)\b", clean) |
| 195 | summaries = re.findall(r"(?m)^[ \t]*(\d+) passed(?:, (\d+) failed)?(?:, (\d+) skipped)?" |
| 196 | r"(?:, (\d+) deselected)?[ \t]*$", clean) |
| 197 | if rows != [(name, "PASS") for name in tests] or starts != tests or len(summaries) != 1: |
| 198 | raise Infrastructure("selected native tests did not run exactly once and pass") |
| 199 | if [int(value or 0) for value in summaries[0]][:3] != [len(tests), 0, 0]: |
| 200 | raise Infrastructure("native suite summary failed") |
| 201 | |
| 202 | |
| 203 | def parse_events(stderr, ids): |
no test coverage detected