This commit is contained in:
Richard Feldman 2025-12-09 16:56:09 -05:00
parent d8a7864f2b
commit 7d099cdd50
No known key found for this signature in database
2 changed files with 35 additions and 0 deletions

View file

@ -764,6 +764,7 @@ const MiniCiStep = struct {
// Run the sequence of `zig build` commands that make up the
// mini CI pipeline.
try runSubBuild(step, "fmt", "zig build fmt");
try checkTestWiring(step);
try runSubBuild(step, null, "zig build");
try checkBuiltinRocFormatting(step);
try runSubBuild(step, "snapshot", "zig build snapshot");
@ -882,6 +883,39 @@ const MiniCiStep = struct {
},
}
}
fn checkTestWiring(step: *Step) !void {
const b = step.owner;
std.debug.print("---- minici: checking test wiring ----\n", .{});
var child_argv = std.ArrayList([]const u8).empty;
defer child_argv.deinit(b.allocator);
try child_argv.append(b.allocator, b.graph.zig_exe);
try child_argv.append(b.allocator, "run");
try child_argv.append(b.allocator, "ci/check_test_wiring.zig");
var child = std.process.Child.init(child_argv.items, b.allocator);
child.stdin_behavior = .Inherit;
child.stdout_behavior = .Inherit;
child.stderr_behavior = .Inherit;
const term = try child.spawnAndWait();
switch (term) {
.Exited => |code| {
if (code != 0) {
return step.fail(
"Test wiring check failed. Run 'zig run ci/check_test_wiring.zig' to see details.",
.{},
);
}
},
else => {
return step.fail("zig run ci/check_test_wiring.zig terminated abnormally", .{});
},
}
}
};
fn createAndRunBuiltinCompiler(

View file

@ -41,4 +41,5 @@ test "check tests" {
std.testing.refAllDecls(@import("test/builtin_scope_test.zig"));
std.testing.refAllDecls(@import("test/num_type_inference_test.zig"));
std.testing.refAllDecls(@import("test/unify_test.zig"));
std.testing.refAllDecls(@import("test/instantiate_tag_union_test.zig"));
}