| ... | @@ -141,8 +141,20 @@ pub fn main2() anyerror!void { | ... | @@ -141,8 +141,20 @@ pub fn main2() anyerror!void { |
| 141 | } | 141 | } |
| 142 | }; | 142 | }; |
| 143 | } | 143 | } |
| 144 | if (builtin.zig_backend == .stage2_llvm or | 144 | if (builtin.zig_backend == .stage2_llvm) { |
| 145 | builtin.zig_backend == .stage2_wasm or | 145 | const stderr = std.io.getStdErr().writer(); |
| | 146 | const ok_count = builtin.test_functions.len - skipped - failed; |
| | 147 | if (ok_count == builtin.test_functions.len) { |
| | 148 | try stderr.print("All {d} tests passed.\n", .{ok_count}); |
| | 149 | } else { |
| | 150 | try stderr.print("{d} passed; ", .{ok_count}); |
| | 151 | try stderr.print("{d} skipped; ", .{skipped}); |
| | 152 | try stderr.print("{d} failed.\n", .{failed}); |
| | 153 | } |
| | 154 | if (failed != 0) { |
| | 155 | std.process.exit(1); |
| | 156 | } |
| | 157 | } else if (builtin.zig_backend == .stage2_wasm or |
| 146 | builtin.zig_backend == .stage2_x86_64) | 158 | builtin.zig_backend == .stage2_x86_64) |
| 147 | { | 159 | { |
| 148 | const passed = builtin.test_functions.len - skipped - failed; | 160 | const passed = builtin.test_functions.len - skipped - failed; |