aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-03-19 19:35:58 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-03-20 21:00:06 -0400
commitbc0f246911a35324473f72b770cc5715902cc912 (patch)
treeb86b503cffd5e2027c3a0b5a16dbefbb312105d4 /test
parent3a25f6a22e0f339fcaecc87efb0fa4e5f67bd73c (diff)
downloadzig-bc0f246911a35324473f72b770cc5715902cc912.tar.gz
zig-bc0f246911a35324473f72b770cc5715902cc912.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/tests.zig4
1 files changed, 4 insertions, 0 deletions
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;