From 21a55d89b6f14f03c905220ce174bc72cd6a91b0 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 16 Sep 2017 18:09:16 -0400 Subject: [PATCH] add release-safe to the test matrix See #449 the llvm assertion that is being triggered appears to be an llvm bug that is harmless with assertions off. --- test/tests.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tests.zig b/test/tests.zig index abf4f40e1bc70fc6b79dd87882979729b4fdc788..973351cad740a0d4c82af41c497a81f72b1f19a1 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -148,7 +148,7 @@ pub fn addPkgTestsRaw(b: &build.Builder, test_filter: ?[]const u8, root_src: []c const step = b.step(b.fmt("test-{}", name), desc); for (test_targets) |test_target| { const is_native = (test_target.os == builtin.os and test_target.arch == builtin.arch); - for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { + for ([]Mode{Mode.Debug, Mode.ReleaseSafe, Mode.ReleaseFast}) |mode| { for (libc_bools) |link_libc| { if (link_libc and !is_native) { // don't assume we have a cross-compiling libc set up @@ -418,7 +418,7 @@ pub const CompareOutputContext = struct { self.step.dependOn(&run_and_cmp_output.step); }, Special.None => { - for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { + for ([]Mode{Mode.Debug, Mode.ReleaseSafe, Mode.ReleaseFast}) |mode| { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "{} {} ({})", "compare-output", case.name, @enumTagName(mode)); if (self.test_filter) |filter| { @@ -664,7 +664,7 @@ pub const CompileErrorContext = struct { pub fn addCase(self: &CompileErrorContext, case: &const TestCase) { const b = self.b; - for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { + for ([]Mode{Mode.Debug, Mode.ReleaseSafe, Mode.ReleaseFast}) |mode| { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "compile-error {} ({})", case.name, @enumTagName(mode)); if (self.test_filter) |filter| { @@ -730,7 +730,7 @@ pub const BuildExamplesContext = struct { pub fn addAllArgs(self: &BuildExamplesContext, root_src: []const u8, link_libc: bool) { const b = self.b; - for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { + for ([]Mode{Mode.Debug, Mode.ReleaseSafe, Mode.ReleaseFast}) |mode| { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "build {} ({})", root_src, @enumTagName(mode)); if (self.test_filter) |filter| { -- 2.54.0