diff --git a/build.zig b/build.zig index 704c71926ebcde5a41bc4eae3e74e95fea0f4f5a..5cce32b0b541b2442a37432ce71710d1a656d2c2 100644 --- a/build.zig +++ b/build.zig @@ -457,7 +457,9 @@ pub fn build(b: *std.Build) !void { }); test_step.dependOn(test_cases_step); - test_step.dependOn(tests.addModuleTests(b, .{ + const test_modules_step = b.step("test-modules", "Run the per-target module tests"); + + test_modules_step.dependOn(tests.addModuleTests(b, .{ .test_filters = test_filters, .test_target_filters = test_target_filters, .test_slow_targets = test_slow_targets, @@ -472,7 +474,7 @@ pub fn build(b: *std.Build) !void { .max_rss = 1 * 1024 * 1024 * 1024, })); - test_step.dependOn(tests.addModuleTests(b, .{ + test_modules_step.dependOn(tests.addModuleTests(b, .{ .test_filters = test_filters, .test_target_filters = test_target_filters, .test_slow_targets = test_slow_targets, @@ -486,7 +488,7 @@ pub fn build(b: *std.Build) !void { .skip_libc = skip_libc, })); - test_step.dependOn(tests.addModuleTests(b, .{ + test_modules_step.dependOn(tests.addModuleTests(b, .{ .test_filters = test_filters, .test_target_filters = test_target_filters, .test_slow_targets = test_slow_targets, @@ -501,7 +503,7 @@ pub fn build(b: *std.Build) !void { .no_builtin = true, })); - test_step.dependOn(tests.addModuleTests(b, .{ + test_modules_step.dependOn(tests.addModuleTests(b, .{ .test_filters = test_filters, .test_target_filters = test_target_filters, .test_slow_targets = test_slow_targets, @@ -516,6 +518,24 @@ pub fn build(b: *std.Build) !void { .no_builtin = true, })); + test_modules_step.dependOn(tests.addModuleTests(b, .{ + .test_filters = test_filters, + .test_target_filters = test_target_filters, + .test_slow_targets = test_slow_targets, + .root_src = "lib/std/std.zig", + .name = "std", + .desc = "Run the standard library tests", + .optimize_modes = optimization_modes, + .include_paths = &.{}, + .skip_single_threaded = skip_single_threaded, + .skip_non_native = skip_non_native, + .skip_libc = skip_libc, + // I observed a value of 4572626944 on the M2 CI. + .max_rss = 5029889638, + })); + + test_step.dependOn(test_modules_step); + test_step.dependOn(tests.addCompareOutputTests(b, test_filters, optimization_modes)); test_step.dependOn(tests.addStandaloneTests( b, @@ -529,21 +549,6 @@ pub fn build(b: *std.Build) !void { test_step.dependOn(tests.addStackTraceTests(b, test_filters, optimization_modes)); test_step.dependOn(tests.addCliTests(b)); test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes)); - test_step.dependOn(tests.addModuleTests(b, .{ - .test_filters = test_filters, - .test_target_filters = test_target_filters, - .test_slow_targets = test_slow_targets, - .root_src = "lib/std/std.zig", - .name = "std", - .desc = "Run the standard library tests", - .optimize_modes = optimization_modes, - .include_paths = &.{}, - .skip_single_threaded = skip_single_threaded, - .skip_non_native = skip_non_native, - .skip_libc = skip_libc, - // I observed a value of 4572626944 on the M2 CI. - .max_rss = 5029889638, - })); try addWasiUpdateStep(b, version);