From 0b6cfac8b0210e9c8435a397860268c51f24639e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 1 Oct 2023 18:34:51 -0700 Subject: [PATCH] don't run dependency tests anymore --- build.zig | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/build.zig b/build.zig index 1f980590a..efdd794f3 100644 --- a/build.zig +++ b/build.zig @@ -594,33 +594,6 @@ pub fn build(b: *std.Build) !void { const test_run = b.addRunArtifact(main_test); test_step.dependOn(&test_run.step); } - - // Named package dependencies don't have their tests run by reference, - // so we iterate through them here. We're only interested in dependencies - // we wrote (are in the "pkg/" directory). - var it = main_test.modules.iterator(); - while (it.next()) |entry| { - const name = entry.key_ptr.*; - const module = entry.value_ptr.*; - if (std.mem.eql(u8, name, "build_options")) continue; - if (std.mem.eql(u8, name, "glfw")) continue; - - const test_exe = b.addTest(.{ - .name = b.fmt("{s}-test", .{name}), - .root_source_file = module.source_file, - .target = target, - }); - if (emit_test_exe) b.installArtifact(test_exe); - - _ = try addDeps(b, test_exe, true); - // if (pkg.dependencies) |children| { - // test_.packages = std.ArrayList(std.build.Pkg).init(b.allocator); - // try test_.packages.appendSlice(children); - // } - - const test_run = b.addRunArtifact(test_exe); - test_step.dependOn(&test_run.step); - } } }