mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-31 12:49:03 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user