diff options
Diffstat (limited to 'test/perf.zig')
| -rw-r--r-- | test/perf.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/perf.zig b/test/perf.zig index 85cc2ca3..c52c1715 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -467,6 +467,18 @@ pub fn main(init: std.process.Init) !void { if (opts.mini) return measureMini(init.io, init.gpa, reps, opts.json); if (opts.live) |exe| return measureLive(init.io, exe, false, reps, opts.json); if (opts.live_gui) |exe| return measureLive(init.io, exe, true, reps, opts.json); + // The image-frame cells load the image addon by the path the build baked + // in, relative to the build root (`zig build perf` runs there). Gone (the + // cache wiped, another directory), the run would end at its last cell as + // ImageNotShown, a count short that a script could take for a number: + // refused before any measurement. + if (opts.op == null or opts.op.? == .image_frame) { + const addon = @import("perf_options").image_addon; + std.Io.Dir.cwd().access(init.io, addon, .{}) catch |err| { + std.debug.print("pardes-perf: no image addon at {s} ({t}), relative to the working directory: run it from the build root (zig build perf)\n", .{ addon, err }); + return error.ImageAddonMissing; + }; + } var random: [12]u8 = undefined; init.io.random(&random); |
