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 {...@@ -38,10 +38,10 @@ pub fn main(init: std.process.Init.Minimal) void {
38 }38 }
3939
40 if (need_simple) {40 if (need_simple) {
41 return mainSimple() catch @panic("test failure");41 return mainSimple() catch |err| std.debug.panic("test failure: {t}", .{err});
42 }42 }
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
46 var listen = false;46 var listen = false;
47 var opt_cache_dir: ?[]const u8 = null;47 var opt_cache_dir: ?[]const u8 = null;
...@@ -55,7 +55,7 @@ pub fn main(init: std.process.Init.Minimal) void {...@@ -55,7 +55,7 @@ pub fn main(init: std.process.Init.Minimal) void {
55 } else if (std.mem.startsWith(u8, arg, "--cache-dir")) {55 } else if (std.mem.startsWith(u8, arg, "--cache-dir")) {
56 opt_cache_dir = arg["--cache-dir=".len..];56 opt_cache_dir = arg["--cache-dir=".len..];
57 } else {57 } else {
58 @panic("unrecognized command line argument");58 std.debug.panic("unrecognized command line argument: {s}", .{arg});
59 }59 }
60 }60 }
6161
...@@ -65,7 +65,7 @@ pub fn main(init: std.process.Init.Minimal) void {...@@ -65,7 +65,7 @@ pub fn main(init: std.process.Init.Minimal) void {
65 }65 }
6666
67 if (listen) {67 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});
69 } else {69 } else {
70 return mainTerminal(init);70 return mainTerminal(init);
71 }71 }