authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-03-09 22:41:21+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-03-10 11:28:36+00:00
log502cab9ae30b001a8da2f724711330a73e7e2e4f
tree199563a108f4891a08e678167d05def8895dd867
parent79e7b719a362959fd172bbe7f7d9abe3e2f6f0cc
signaturelock-open Commit is signed but in an unrecognized format.

test_runner: actually print the error that caused a runner failure

part of the Stop Throwing Away Useful Information initiative

1 files changed, 4 insertions(+), 4 deletions(-)

lib/compiler/test_runner.zig+4-4
......@@ -38,10 +38,10 @@ pub fn main(init: std.process.Init.Minimal) void {
3838 }
3939
4040 if (need_simple) {
41 return mainSimple() catch @panic("test failure");
41 return mainSimple() catch |err| std.debug.panic("test failure: {t}", .{err});
4242 }
4343
44 const args = init.args.toSlice(fba.allocator()) catch @panic("unable to parse command line args");
44 const args = init.args.toSlice(fba.allocator()) catch |err| std.debug.panic("unable to parse command line args: {t}", .{err});
4545
4646 var listen = false;
4747 var opt_cache_dir: ?[]const u8 = null;
......@@ -55,7 +55,7 @@ pub fn main(init: std.process.Init.Minimal) void {
5555 } else if (std.mem.startsWith(u8, arg, "--cache-dir")) {
5656 opt_cache_dir = arg["--cache-dir=".len..];
5757 } else {
58 @panic("unrecognized command line argument");
58 std.debug.panic("unrecognized command line argument: {s}", .{arg});
5959 }
6060 }
6161
......@@ -65,7 +65,7 @@ pub fn main(init: std.process.Init.Minimal) void {
6565 }
6666
6767 if (listen) {
68 return mainServer(init) catch @panic("internal test runner failure");
68 return mainServer(init) catch |err| std.debug.panic("internal test runner failure: {t}", .{err});
6969 } else {
7070 return mainTerminal(init);
7171 }