mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-18 22:22:22 +00:00
Merge branch 'fix/go-test-diagnostics' of https://github.com/M-Hassan-Raza/kitty
This commit is contained in:
commit
ce459fb1a4
1 changed files with 11 additions and 0 deletions
|
|
@ -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:')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue