From 502cab9ae30b001a8da2f724711330a73e7e2e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 9 Mar 2026 22:41:21 +0100 Subject: [PATCH] test_runner: actually print the error that caused a runner failure part of the Stop Throwing Away Useful Information initiative --- lib/compiler/test_runner.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compiler/test_runner.zig b/lib/compiler/test_runner.zig index 899b5dafbfb7fa2683854b81ff198eb2a7be4573..db8958519a4d44ef96cd006980146276b93d29cf 100644 --- a/lib/compiler/test_runner.zig +++ b/lib/compiler/test_runner.zig @@ -38,10 +38,10 @@ pub fn main(init: std.process.Init.Minimal) void { } if (need_simple) { - return mainSimple() catch @panic("test failure"); + return mainSimple() catch |err| std.debug.panic("test failure: {t}", .{err}); } - const args = init.args.toSlice(fba.allocator()) catch @panic("unable to parse command line args"); + const args = init.args.toSlice(fba.allocator()) catch |err| std.debug.panic("unable to parse command line args: {t}", .{err}); var listen = false; var opt_cache_dir: ?[]const u8 = null; @@ -55,7 +55,7 @@ pub fn main(init: std.process.Init.Minimal) void { } else if (std.mem.startsWith(u8, arg, "--cache-dir")) { opt_cache_dir = arg["--cache-dir=".len..]; } else { - @panic("unrecognized command line argument"); + std.debug.panic("unrecognized command line argument: {s}", .{arg}); } } @@ -65,7 +65,7 @@ pub fn main(init: std.process.Init.Minimal) void { } if (listen) { - return mainServer(init) catch @panic("internal test runner failure"); + return mainServer(init) catch |err| std.debug.panic("internal test runner failure: {t}", .{err}); } else { return mainTerminal(init); } -- 2.54.0