Skip to content

Commit 33bcae6

Browse files
committed
junit: filter chipStar runtime info/warning lines from test stderr
chipStar's HIPRTC prints lines like: CHIP warning [TID ...]: hiprtc: ignored option: '-default-device' CHIP info [TID ...]: CHIP_PLATFORM=0 to stderr on every test invocation. The junit framework treats any non-empty stderr as a test failure, causing all HIP backend tests to be marked as failed regardless of their actual result. Filter lines beginning with 'CHIP info ', 'CHIP warning ', or 'CHIP debug ' before deciding whether stderr constitutes a failure. The full (unfiltered) stderr is still reported in the failure message so the output remains visible for debugging.
1 parent 9109e26 commit 33bcae6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/junit_common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,12 @@ def run_test(index: int, test: str, spec: TestSpec, backend: str,
460460

461461
# classify other results
462462
if not test_case.is_skipped() and not test_case.status:
463-
if test_case.stderr:
463+
# Filter out chipStar (CHIP) runtime informational/warning lines which are not errors
464+
filtered_stderr = '\n'.join(
465+
line for line in test_case.stderr.split('\n')
466+
if not line.startswith(('CHIP info ', 'CHIP warning ', 'CHIP debug '))
467+
).strip()
468+
if filtered_stderr:
464469
test_case.add_failure_info('stderr', test_case.stderr)
465470
if proc.returncode != 0:
466471
test_case.add_error_info(f'returncode = {proc.returncode}')

0 commit comments

Comments
 (0)