Merge branch 'fix/go-test-diagnostics' of https://github.com/M-Hassan-Raza/kitty

This commit is contained in:
Kovid Goyal 2026-10-06 15:12:13 +05:30
commit ce459fb1a4
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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:')