authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-09 21:49:32-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-10 06:03:57-05:00
logb36ea592b86ef20473697ded24a27bb644941de8
tree1e06b4e509b71711e3dda0c657a958e014a96dfa
parentbc846c3799ecad651763a853b2031514867e6952

build.zig: make unit tests not use the full matrix


1 files changed, 18 insertions(+), 15 deletions(-)

build.zig+18-15
......@@ -433,6 +433,7 @@ pub fn build(b: *std.Build) !void {
433433 test_step.dependOn(test_cases_step);
434434
435435 const test_modules_step = b.step("test-modules", "Run the per-target module tests");
436 test_step.dependOn(test_modules_step);
436437
437438 test_modules_step.dependOn(tests.addModuleTests(b, .{
438439 .test_filters = test_filters,
......@@ -509,22 +510,24 @@ pub fn build(b: *std.Build) !void {
509510 .max_rss = 5029889638,
510511 }));
511512
512 test_modules_step.dependOn(tests.addModuleTests(b, .{
513 .test_filters = test_filters,
514 .test_target_filters = test_target_filters,
515 .test_slow_targets = test_slow_targets,
516 .root_src = "src/main.zig",
517 .name = "compiler-internals",
518 .desc = "Run the compiler internals tests",
519 .optimize_modes = optimization_modes,
520 .include_paths = &.{},
521 .skip_single_threaded = skip_single_threaded,
522 .skip_non_native = true,
523 .skip_libc = skip_libc,
524 .build_options = exe_options,
525 }));
513 const unit_tests_step = b.step("test-unit", "Run the compiler source unit tests");
514 test_step.dependOn(unit_tests_step);
526515
527 test_step.dependOn(test_modules_step);
516 const unit_tests = b.addTest(.{
517 .root_module = b.createModule(.{
518 .root_source_file = b.path("src/main.zig"),
519 .optimize = optimize,
520 .target = target,
521 .link_libc = link_libc,
522 .single_threaded = single_threaded,
523 }),
524 .filters = test_filters,
525 .use_llvm = use_llvm,
526 .use_lld = use_llvm,
527 .zig_lib_dir = b.path("lib"),
528 });
529 unit_tests.root_module.addOptions("build_options", exe_options);
530 unit_tests_step.dependOn(&b.addRunArtifact(unit_tests).step);
528531
529532 test_step.dependOn(tests.addCompareOutputTests(b, test_filters, optimization_modes));
530533 test_step.dependOn(tests.addStandaloneTests(