diff --git a/lib/std/special/test_runner.zig b/lib/std/special/test_runner.zig index f8377f283b..6f392e710b 100644 --- a/lib/std/special/test_runner.zig +++ b/lib/std/special/test_runner.zig @@ -141,8 +141,20 @@ pub fn main2() anyerror!void { } }; } - if (builtin.zig_backend == .stage2_llvm or - builtin.zig_backend == .stage2_wasm or + if (builtin.zig_backend == .stage2_llvm) { + const stderr = std.io.getStdErr().writer(); + const ok_count = builtin.test_functions.len - skipped - failed; + if (ok_count == builtin.test_functions.len) { + try stderr.print("All {d} tests passed.\n", .{ok_count}); + } else { + try stderr.print("{d} passed; ", .{ok_count}); + try stderr.print("{d} skipped; ", .{skipped}); + try stderr.print("{d} failed.\n", .{failed}); + } + if (failed != 0) { + std.process.exit(1); + } + } else if (builtin.zig_backend == .stage2_wasm or builtin.zig_backend == .stage2_x86_64) { const passed = builtin.test_functions.len - skipped - failed; diff --git a/src/Sema.zig b/src/Sema.zig index 8e93d2525b..4302221c40 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -10975,8 +10975,7 @@ fn zirCondbr( if (try sema.resolveDefinedValue(parent_block, src, cond)) |cond_val| { const body = if (cond_val.toBool()) then_body else else_body; - _ = try sema.analyzeBody(parent_block, body); - return always_noreturn; + return sema.analyzeBodyInner(parent_block, body); } const gpa = sema.gpa;