authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-11 11:47:22-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-11 11:47:22-07:00
logc3d4733a00880e2c757b61b66ba18d9b6753aa11
treebcf0d36e323b36d92e6fa51440b664a5f8aed9d0
parent65d279bc053790c8f0792c22e7e7d96b0e0d7860

test runner: avoid an "out of memory" error return trace entry

The long term solution to this will be #1923

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

lib/std/special/test_runner.zig+4-1
......@@ -14,12 +14,15 @@ var log_err_count: usize = 0;
1414var args_buffer: [std.fs.MAX_PATH_BYTES + std.mem.page_size]u8 = undefined;
1515var args_allocator = std.heap.FixedBufferAllocator.init(&args_buffer);
1616
17pub fn main() anyerror!void {
17fn processArgs() void {
1818 const args = std.process.argsAlloc(&args_allocator.allocator) catch {
1919 @panic("Too many bytes passed over the CLI to the test runner");
2020 };
2121 std.testing.zig_exe_path = args[1];
22}
2223
24pub fn main() anyerror!void {
25 processArgs();
2326 const test_fn_list = builtin.test_functions;
2427 var ok_count: usize = 0;
2528 var skip_count: usize = 0;