mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-06-08 10:07:01 +09:00
exec is now run
This commit is contained in:
parent
890fe8e1c4
commit
6c8ba96f7c
1 changed files with 3 additions and 3 deletions
|
@ -288,7 +288,7 @@ const ZiglingStep = struct {
|
||||||
// Allow up to 1 MB of stdout capture.
|
// Allow up to 1 MB of stdout capture.
|
||||||
const max_output_bytes = 1 * 1024 * 1024;
|
const max_output_bytes = 1 * 1024 * 1024;
|
||||||
|
|
||||||
var result = Child.exec(.{
|
var result = Child.run(.{
|
||||||
.allocator = b.allocator,
|
.allocator = b.allocator,
|
||||||
.argv = &.{exe_path},
|
.argv = &.{exe_path},
|
||||||
.cwd = b.build_root.path.?,
|
.cwd = b.build_root.path.?,
|
||||||
|
@ -306,7 +306,7 @@ const ZiglingStep = struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_output(self: *ZiglingStep, result: Child.ExecResult) !void {
|
fn check_output(self: *ZiglingStep, result: Child.RunResult) !void {
|
||||||
const b = self.step.owner;
|
const b = self.step.owner;
|
||||||
|
|
||||||
// Make sure it exited cleanly.
|
// Make sure it exited cleanly.
|
||||||
|
@ -355,7 +355,7 @@ const ZiglingStep = struct {
|
||||||
print("{s}PASSED:\n{s}{s}\n\n", .{ green_text, output, reset_text });
|
print("{s}PASSED:\n{s}{s}\n\n", .{ green_text, output, reset_text });
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_test(self: *ZiglingStep, result: Child.ExecResult) !void {
|
fn check_test(self: *ZiglingStep, result: Child.RunResult) !void {
|
||||||
switch (result.term) {
|
switch (result.term) {
|
||||||
.Exited => |code| {
|
.Exited => |code| {
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue