test-stack-traces: update to new main API

This commit is contained in:
Andrew Kelley 2026-01-02 22:03:58 -08:00
parent b32a38ad27
commit 84da158afb

View file

@ -24,20 +24,13 @@
//!
//! With these transformations, the test harness can safely do string comparisons.
pub fn main() !void {
var arena_instance: std.heap.ArenaAllocator = .init(std.heap.page_allocator);
defer arena_instance.deinit();
const arena = arena_instance.allocator();
pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const args = try init.minimal.args.toSlice(arena);
const args = try std.process.argsAlloc(arena);
if (args.len != 2) std.process.fatal("usage: convert-stack-trace path/to/test/output", .{});
const gpa = arena;
var threaded: std.Io.Threaded = .init(gpa, .{});
defer threaded.deinit();
const io = threaded.io();
var read_buf: [1024]u8 = undefined;
var write_buf: [1024]u8 = undefined;