test runner: restore previous behavior when...
...stderr does not support ansi escape codesmaster
parent
9a82f00a4f
commit
65165554d0
|
@ -15,14 +15,17 @@ pub fn main() anyerror!void {
|
|||
for (test_fn_list) |test_fn, i| {
|
||||
var test_node = root_node.start(test_fn.name, null);
|
||||
test_node.activate();
|
||||
if (progress.terminal == null) std.debug.warn("{}/{} {}...", i + 1, test_fn_list.len, test_fn.name);
|
||||
if (test_fn.func()) |_| {
|
||||
ok_count += 1;
|
||||
test_node.end();
|
||||
if (progress.terminal == null) std.debug.warn("OK\n");
|
||||
} else |err| switch (err) {
|
||||
error.SkipZigTest => {
|
||||
skip_count += 1;
|
||||
test_node.end();
|
||||
progress.log("{}...SKIP\n", test_fn.name);
|
||||
if (progress.terminal == null) std.debug.warn("SKIP\n");
|
||||
},
|
||||
else => return err,
|
||||
}
|
||||
|
@ -30,5 +33,6 @@ pub fn main() anyerror!void {
|
|||
root_node.end();
|
||||
if (ok_count != test_fn_list.len) {
|
||||
progress.log("{} passed; {} skipped.\n", ok_count, skip_count);
|
||||
if (progress.terminal == null) std.debug.warn("{} passed; {} skipped.\n", ok_count, skip_count);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue