mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
fix standalone test
This commit is contained in:
parent
807c14a956
commit
44f7c0717f
2 changed files with 5 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ pub fn main() !void {
|
|||
_ = args.next() orelse unreachable; // skip executable name
|
||||
const child_path = args.next() orelse unreachable;
|
||||
|
||||
const argv = if (builtin.os.tag == .windows) &.{""} else &.{ child_path, "30" };
|
||||
const argv = &.{""};
|
||||
var child = std.process.Child.init(argv, gpa);
|
||||
child.stdin_behavior = .Ignore;
|
||||
child.stderr_behavior = .Ignore;
|
||||
|
|
@ -23,7 +23,9 @@ pub fn main() !void {
|
|||
}
|
||||
|
||||
if (child.spawn()) {
|
||||
return error.SpawnSilencedError;
|
||||
if (child.waitForSpawn()) {
|
||||
return error.SpawnSilencedError;
|
||||
} else |_| {}
|
||||
} else |_| {}
|
||||
|
||||
child = std.process.Child.init(&.{ child_path, "30" }, gpa);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ pub fn main() !void {
|
|||
child.stdout_behavior = .Pipe;
|
||||
child.detached = true;
|
||||
try child.spawn();
|
||||
try child.waitForSpawn();
|
||||
defer {
|
||||
_ = child.kill() catch {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue