authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-21 20:49:35-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-21 20:50:47-04:00
log65165554d0c6cf39ff091ace5ab5d48106a935fd
treee38868124fe56d634bd18670afaf67501e1f53cb
parent9a82f00a4fb897acf50446a725768c3aaa562513
signaturelock-open Commit is signed but in an unrecognized format.

test runner: restore previous behavior when...

...stderr does not support ansi escape codes

1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/special/test_runner.zig+4
......@@ -15,14 +15,17 @@ pub fn main() anyerror!void {
1515 for (test_fn_list) |test_fn, i| {
1616 var test_node = root_node.start(test_fn.name, null);
1717 test_node.activate();
18 if (progress.terminal == null) std.debug.warn("{}/{} {}...", i + 1, test_fn_list.len, test_fn.name);
1819 if (test_fn.func()) |_| {
1920 ok_count += 1;
2021 test_node.end();
22 if (progress.terminal == null) std.debug.warn("OK\n");
2123 } else |err| switch (err) {
2224 error.SkipZigTest => {
2325 skip_count += 1;
2426 test_node.end();
2527 progress.log("{}...SKIP\n", test_fn.name);
28 if (progress.terminal == null) std.debug.warn("SKIP\n");
2629 },
2730 else => return err,
2831 }
......@@ -30,5 +33,6 @@ pub fn main() anyerror!void {
3033 root_node.end();
3134 if (ok_count != test_fn_list.len) {
3235 progress.log("{} passed; {} skipped.\n", ok_count, skip_count);
36 if (progress.terminal == null) std.debug.warn("{} passed; {} skipped.\n", ok_count, skip_count);
3337 }
3438}