From bc0f246911a35324473f72b770cc5715902cc912 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Sun, 19 Mar 2023 19:35:58 -0400 Subject: tests: add -Dskip-cross-glibc option It is reasonable to pass -Dskip-non-native when unable to run foreign binaries, however there is no option for being able to run foreign static binaries but unable to run foreign dynamic binaries. This can occur when qemu is installed but not cross glibc. --- test/tests.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/tests.zig b/test/tests.zig index 3166fbc14a..26e684cd0d 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -910,6 +910,7 @@ const ModuleTestOptions = struct { optimize_modes: []const OptimizeMode, skip_single_threaded: bool, skip_non_native: bool, + skip_cross_glibc: bool, skip_libc: bool, skip_stage1: bool, skip_stage2: bool, @@ -923,6 +924,9 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { if (options.skip_non_native and !test_target.target.isNative()) continue; + if (options.skip_cross_glibc and test_target.target.isGnuLibC() and test_target.link_libc) + continue; + if (options.skip_libc and test_target.link_libc) continue; -- cgit v1.2.3