commit aae90762cc96fc19ee2ba3aa64a54ca1fcee842b (tree)
parent d12aed5f148c61ab7db043e9a357b7d9a427d0f0
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Tue, 16 Sep 2025 16:36:17 +0200
build: skip test-cimport when -Dskip-translate-c is given
Diffstat:
| M | build.zig | | | 40 | +++++++++++++++++++++------------------- |
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/build.zig b/build.zig
@@ -464,25 +464,27 @@ pub fn build(b: *std.Build) !void {
.max_rss = 4000000000,
}));
- test_modules_step.dependOn(tests.addModuleTests(b, .{
- .test_filters = test_filters,
- .test_target_filters = test_target_filters,
- .test_extra_targets = test_extra_targets,
- .root_src = "test/c_import.zig",
- .name = "c-import",
- .desc = "Run the @cImport tests",
- .optimize_modes = optimization_modes,
- .include_paths = &.{"test/c_import"},
- .skip_single_threaded = true,
- .skip_non_native = skip_non_native,
- .skip_freebsd = skip_freebsd,
- .skip_netbsd = skip_netbsd,
- .skip_windows = skip_windows,
- .skip_macos = skip_macos,
- .skip_linux = skip_linux,
- .skip_llvm = skip_llvm,
- .skip_libc = skip_libc,
- }));
+ if (!skip_translate_c) {
+ test_modules_step.dependOn(tests.addModuleTests(b, .{
+ .test_filters = test_filters,
+ .test_target_filters = test_target_filters,
+ .test_extra_targets = test_extra_targets,
+ .root_src = "test/c_import.zig",
+ .name = "c-import",
+ .desc = "Run the @cImport tests",
+ .optimize_modes = optimization_modes,
+ .include_paths = &.{"test/c_import"},
+ .skip_single_threaded = true,
+ .skip_non_native = skip_non_native,
+ .skip_freebsd = skip_freebsd,
+ .skip_netbsd = skip_netbsd,
+ .skip_windows = skip_windows,
+ .skip_macos = skip_macos,
+ .skip_linux = skip_linux,
+ .skip_llvm = skip_llvm,
+ .skip_libc = skip_libc,
+ }));
+ }
test_modules_step.dependOn(tests.addModuleTests(b, .{
.test_filters = test_filters,