diff --git a/kitty_tests/main.py b/kitty_tests/main.py index d144a4735..8e6730ec2 100644 --- a/kitty_tests/main.py +++ b/kitty_tests/main.py @@ -478,6 +478,7 @@ def collect_worker_results( go_failures: list[tuple[str, str]] = [] go_test_output: dict[str, list[str]] = {} go_pkg_output: dict[str, list[str]] = {} + go_other_output: list[str] = [] # (elapsed_seconds, label) for every completed test in both suites all_timings: list[tuple[float, str]] = [] @@ -521,6 +522,8 @@ def collect_worker_results( except OSError: chunk = b'' if not chunk: + if go_buffer: + go_other_output.append(go_buffer.decode('utf-8', errors='replace')) go_active = False go_proc.finish() show_progress(force=True) @@ -533,6 +536,7 @@ def collect_worker_results( try: evt: dict[str, Any] = json.loads(raw) except json.JSONDecodeError: + go_other_output.append(raw.decode('utf-8', errors='replace') + '\n') continue action = evt.get('Action', '') test_name = evt.get('Test', '') @@ -655,6 +659,13 @@ def collect_worker_results( if go_output: print(go_output, end='' if go_output.endswith('\n') else '\n') + if go_proc is not None and go_proc.returncode != 0 and go_other_output: + print(sep1) + print(c(_RED + _BOLD, 'GO ERROR')) + print(sep2) + output = ''.join(go_other_output) + print(output, end='' if output.endswith('\n') else '\n') + if py_unexpected_successes: print(sep1) print('Unexpected successes:')