Function init [src]

Prototype

pub fn init(options: StepOptions) Step

Parameters

options: StepOptions

Source

pub fn init(options: StepOptions) Step { const arena = options.owner.allocator; return .{ .id = options.id, .name = arena.dupe(u8, options.name) catch @panic("OOM"), .owner = options.owner, .makeFn = options.makeFn, .dependencies = std.ArrayList(*Step).init(arena), .dependants = .{}, .inputs = Inputs.init, .state = .precheck_unstarted, .max_rss = options.max_rss, .debug_stack_trace = blk: { const addresses = arena.alloc(usize, options.owner.debug_stack_frames_count) catch @panic("OOM"); @memset(addresses, 0); const first_ret_addr = options.first_ret_addr orelse @returnAddress(); var stack_trace = std.builtin.StackTrace{ .instruction_addresses = addresses, .index = 0, }; std.debug.captureStackTrace(first_ret_addr, &stack_trace); break :blk addresses; }, .result_error_msgs = .{}, .result_error_bundle = std.zig.ErrorBundle.empty, .result_stderr = "", .result_cached = false, .result_duration_ns = null, .result_peak_rss = 0, .test_results = .{}, }; }