Open
Description
Zig Version
0.14.0
Steps to Reproduce and Observed Behavior
zig init
zig build test -Dtarget=native-windows -fwine
Test will not succeed as wine uses stderr
for logging
Expected Behavior
Test should succeed.
Proposed solution
Set WINEDEBUG
as -all
while running tests, which disables all wine logging and allows test to succeed.
For example, command below will pass test just fine:
WINEDEBUG=-all zig build test -Dtarget=native-windows -fwine
Possible solution
Modify this code:
zig/lib/std/Build/Step/Run.zig
Lines 1060 to 1067 in 4d79806
by adding
if (run.stdio == .zig_test) {
try b.graph.env_map.put("WINEDEBUG", "-all");
}
right after
.wine => |bin_name| {
if (b.enable_wine) {
and it works, I tested, but I'm not sure whether it's a good solution.
Full snippet
.wine => |bin_name| {
if (b.enable_wine) {
if (run.stdio == .zig_test) {
try b.graph.env_map.put("WINEDEBUG", "-all");
}
try interp_argv.append(bin_name);
try interp_argv.appendSlice(argv);
} else {
return failForeign(run, "-fwine", argv[0], exe);
}
},