vt: get rid of log spam on tests

Zig 0.16.0 made the criteria for reporting "failed command" stricter (or
looser, depending on your perspective I guess...) - now, tests that
print anything to stderr cause the message to appear.

Note that in this instance tests still pass and you get a return code of
0, but nonetheless, it can be confusing.

Additionally, having spammy passing tests in general is not necessarily
a great experience, so this should help with that.

Note that this change was already done to the main tests. We can add a
build argument to control this if need be.
This commit is contained in:
Chris Marchesi
2026-07-21 22:00:13 -07:00
parent 048619a6bf
commit 4956668702

View File

@@ -386,6 +386,12 @@ pub const std_options: std.Options = opts: {
};
test {
// Zig 0.16.0 has made test logging more strict. Now, *anything* that gets
// printed to stderr results in a "failed command" message, even if the
// tests ultimately passed. To reduce confusion here (and honestly, test
// log spam in general), we bump the default testing log level to error.
@import("std").testing.log_level = std.log.Level.err;
_ = terminal;
_ = @import("lib/main.zig");
@import("std").testing.refAllDecls(input);