Skip to content

Commit

Permalink
disable test runner in release modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexu committed Sep 30, 2023
1 parent 2ed16c1 commit 27b942c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ fn testAllAllocationFailures(cases: [][]const u8, self_exe_dir: []const u8) !voi
}

pub fn main() !void {
const mode = @import("builtin").optimize;
if (mode == .ReleaseFast or mode == .ReleaseSmall) {
return; // Building the test runner in release modes crashes the Zig compiler.
}
const gpa = general_purpose_allocator.allocator();
defer if (general_purpose_allocator.deinit() == .leak) std.process.exit(1);

Expand Down

0 comments on commit 27b942c

Please sign in to comment.