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

The long term solution to this will be #1923
This commit is contained in:
Andrew Kelley 2021-05-11 11:47:22 -07:00
parent 65d279bc05
commit c3d4733a00

View File

@ -14,12 +14,15 @@ var log_err_count: usize = 0;
var args_buffer: [std.fs.MAX_PATH_BYTES + std.mem.page_size]u8 = undefined;
var args_allocator = std.heap.FixedBufferAllocator.init(&args_buffer);
pub fn main() anyerror!void {
fn processArgs() void {
const args = std.process.argsAlloc(&args_allocator.allocator) catch {
@panic("Too many bytes passed over the CLI to the test runner");
};
std.testing.zig_exe_path = args[1];
}
pub fn main() anyerror!void {
processArgs();
const test_fn_list = builtin.test_functions;
var ok_count: usize = 0;
var skip_count: usize = 0;