Skip to content

Commit 7d1f784

Browse files
committed
tests/junit_common: filter chipStar CHIP runtime lines from test stderr
chipStar prints 'CHIP info/warning/debug ...' lines to stderr on every run. These are not test failures but caused JUnit to mark all HIP tests as failed. Filter them out before checking whether stderr is non-empty.
1 parent e3f38d5 commit 7d1f784

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
@@ -670,7 +670,12 @@ def run_test(index: int, test: str, spec: TestSpec, backend: str,
670670

671671
# classify other results
672672
if not test_case.is_skipped() and not test_case.status:
673-
if test_case.stderr:
673+
# Filter out chipStar (CHIP) runtime informational/warning lines which are not errors
674+
filtered_stderr = '\n'.join(
675+
line for line in test_case.stderr.split('\n')
676+
if not line.startswith(('CHIP info ', 'CHIP warning ', 'CHIP debug '))
677+
).strip()
678+
if filtered_stderr:
674679
test_case.add_failure_info('stderr', test_case.stderr)
675680
if proc.returncode != 0:
676681
test_case.add_error_info(f'returncode = {proc.returncode}')

0 commit comments

Comments
 (0)