| author | |
| committer | |
| log | e2a9e568b4cdc2cdb71265c0edb8d9288ded621b |
| tree | 04ad902b0f71ff70f3e2c0fac066567d143b7ea4 |
| parent | ad9a5187ac5d42beeece355788d5620e4a0fc6ef |
| signature |
4 files changed, 31 insertions(+), 0 deletions(-)
build.zig+14| ... | ... | @@ -91,6 +91,8 @@ pub fn build(b: *std.Build) !void { |
| 91 | 91 | const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false; |
| 92 | 92 | const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false; |
| 93 | 93 | const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false; |
| 94 | const skip_spirv = b.option(bool, "skip-spirv", "Main test suite skips targets with spirv32/spirv64 architecture") orelse false; | |
| 95 | const skip_wasm = b.option(bool, "skip-wasm", "Main test suite skips targets with wasm32/wasm64 architecture") orelse false; | |
| 94 | 96 | const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false; |
| 95 | 97 | const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false; |
| 96 | 98 | const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false; |
| ... | ... | @@ -421,6 +423,8 @@ pub fn build(b: *std.Build) !void { |
| 421 | 423 | .test_target_filters = test_target_filters, |
| 422 | 424 | .skip_compile_errors = skip_compile_errors, |
| 423 | 425 | .skip_non_native = skip_non_native, |
| 426 | .skip_spirv = skip_spirv, | |
| 427 | .skip_wasm = skip_wasm, | |
| 424 | 428 | .skip_freebsd = skip_freebsd, |
| 425 | 429 | .skip_netbsd = skip_netbsd, |
| 426 | 430 | .skip_windows = skip_windows, |
| ... | ... | @@ -452,6 +456,8 @@ pub fn build(b: *std.Build) !void { |
| 452 | 456 | .skip_single_threaded = skip_single_threaded, |
| 453 | 457 | .skip_non_native = skip_non_native, |
| 454 | 458 | .test_default_only = no_matrix, |
| 459 | .skip_spirv = skip_spirv, | |
| 460 | .skip_wasm = skip_wasm, | |
| 455 | 461 | .skip_freebsd = skip_freebsd, |
| 456 | 462 | .skip_netbsd = skip_netbsd, |
| 457 | 463 | .skip_windows = skip_windows, |
| ... | ... | @@ -475,6 +481,8 @@ pub fn build(b: *std.Build) !void { |
| 475 | 481 | .skip_single_threaded = true, |
| 476 | 482 | .skip_non_native = skip_non_native, |
| 477 | 483 | .test_default_only = no_matrix, |
| 484 | .skip_spirv = skip_spirv, | |
| 485 | .skip_wasm = skip_wasm, | |
| 478 | 486 | .skip_freebsd = skip_freebsd, |
| 479 | 487 | .skip_netbsd = skip_netbsd, |
| 480 | 488 | .skip_windows = skip_windows, |
| ... | ... | @@ -497,6 +505,8 @@ pub fn build(b: *std.Build) !void { |
| 497 | 505 | .skip_single_threaded = true, |
| 498 | 506 | .skip_non_native = skip_non_native, |
| 499 | 507 | .test_default_only = no_matrix, |
| 508 | .skip_spirv = skip_spirv, | |
| 509 | .skip_wasm = skip_wasm, | |
| 500 | 510 | .skip_freebsd = skip_freebsd, |
| 501 | 511 | .skip_netbsd = skip_netbsd, |
| 502 | 512 | .skip_windows = skip_windows, |
| ... | ... | @@ -519,6 +529,8 @@ pub fn build(b: *std.Build) !void { |
| 519 | 529 | .skip_single_threaded = skip_single_threaded, |
| 520 | 530 | .skip_non_native = skip_non_native, |
| 521 | 531 | .test_default_only = no_matrix, |
| 532 | .skip_spirv = skip_spirv, | |
| 533 | .skip_wasm = skip_wasm, | |
| 522 | 534 | .skip_freebsd = skip_freebsd, |
| 523 | 535 | .skip_netbsd = skip_netbsd, |
| 524 | 536 | .skip_windows = skip_windows, |
| ... | ... | @@ -560,6 +572,7 @@ pub fn build(b: *std.Build) !void { |
| 560 | 572 | test_step.dependOn(tests.addCAbiTests(b, .{ |
| 561 | 573 | .test_target_filters = test_target_filters, |
| 562 | 574 | .skip_non_native = skip_non_native, |
| 575 | .skip_wasm = skip_wasm, | |
| 563 | 576 | .skip_freebsd = skip_freebsd, |
| 564 | 577 | .skip_netbsd = skip_netbsd, |
| 565 | 578 | .skip_windows = skip_windows, |
| ... | ... | @@ -616,6 +629,7 @@ pub fn build(b: *std.Build) !void { |
| 616 | 629 | .optimize_modes = optimization_modes, |
| 617 | 630 | .test_filters = test_filters, |
| 618 | 631 | .test_target_filters = test_target_filters, |
| 632 | .skip_wasm = skip_wasm, | |
| 619 | 633 | // Highest RSS observed in any test case was exactly 1802878976 on x86_64-linux. |
| 620 | 634 | .max_rss = 2253598720, |
| 621 | 635 | })) |test_libc_step| test_step.dependOn(test_libc_step); |
test/src/Cases.zig+5| ... | ... | @@ -444,6 +444,8 @@ pub const CaseTestOptions = struct { |
| 444 | 444 | test_target_filters: []const []const u8, |
| 445 | 445 | skip_compile_errors: bool, |
| 446 | 446 | skip_non_native: bool, |
| 447 | skip_spirv: bool, | |
| 448 | skip_wasm: bool, | |
| 447 | 449 | skip_freebsd: bool, |
| 448 | 450 | skip_netbsd: bool, |
| 449 | 451 | skip_windows: bool, |
| ... | ... | @@ -472,6 +474,9 @@ pub fn lowerToBuildSteps( |
| 472 | 474 | if (options.skip_non_native and !case.target.query.isNative()) |
| 473 | 475 | continue; |
| 474 | 476 | |
| 477 | if (options.skip_spirv and case.target.query.cpu_arch != null and case.target.query.cpu_arch.?.isSpirV()) continue; | |
| 478 | if (options.skip_wasm and case.target.query.cpu_arch != null and case.target.query.cpu_arch.?.isWasm()) continue; | |
| 479 | ||
| 475 | 480 | if (options.skip_freebsd and case.target.query.os_tag == .freebsd) continue; |
| 476 | 481 | if (options.skip_netbsd and case.target.query.os_tag == .netbsd) continue; |
| 477 | 482 | if (options.skip_windows and case.target.query.os_tag == .windows) continue; |
test/src/Libc.zig+3| ... | ... | @@ -10,6 +10,7 @@ pub const Options = struct { |
| 10 | 10 | optimize_modes: []const std.builtin.OptimizeMode, |
| 11 | 11 | test_filters: []const []const u8, |
| 12 | 12 | test_target_filters: []const []const u8, |
| 13 | skip_wasm: bool, | |
| 13 | 14 | max_rss: usize, |
| 14 | 15 | }; |
| 15 | 16 | |
| ... | ... | @@ -41,6 +42,8 @@ pub fn addLibcTestCase( |
| 41 | 42 | } |
| 42 | 43 | |
| 43 | 44 | pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void { |
| 45 | if (libc.options.skip_wasm and target.query.cpu_arch != null and target.query.cpu_arch.?.isWasm()) return; | |
| 46 | ||
| 44 | 47 | if (libc.options.test_target_filters.len > 0) { |
| 45 | 48 | const triple_txt = target.query.zigTriple(libc.b.allocator) catch @panic("OOM"); |
| 46 | 49 | for (libc.options.test_target_filters) |filter| { |
test/tests.zig+9| ... | ... | @@ -2246,6 +2246,8 @@ const ModuleTestOptions = struct { |
| 2246 | 2246 | test_default_only: bool, |
| 2247 | 2247 | skip_single_threaded: bool, |
| 2248 | 2248 | skip_non_native: bool, |
| 2249 | skip_spirv: bool, | |
| 2250 | skip_wasm: bool, | |
| 2249 | 2251 | skip_freebsd: bool, |
| 2250 | 2252 | skip_netbsd: bool, |
| 2251 | 2253 | skip_windows: bool, |
| ... | ... | @@ -2281,6 +2283,9 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 2281 | 2283 | if (options.skip_non_native and !test_target.target.isNative()) |
| 2282 | 2284 | continue; |
| 2283 | 2285 | |
| 2286 | if (options.skip_spirv and test_target.target.cpu_arch != null and test_target.target.cpu_arch.?.isSpirV()) continue; | |
| 2287 | if (options.skip_wasm and test_target.target.cpu_arch != null and test_target.target.cpu_arch.?.isWasm()) continue; | |
| 2288 | ||
| 2284 | 2289 | if (options.skip_freebsd and test_target.target.os_tag == .freebsd) continue; |
| 2285 | 2290 | if (options.skip_netbsd and test_target.target.os_tag == .netbsd) continue; |
| 2286 | 2291 | if (options.skip_windows and test_target.target.os_tag == .windows) continue; |
| ... | ... | @@ -2519,6 +2524,7 @@ pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: Opt |
| 2519 | 2524 | const CAbiTestOptions = struct { |
| 2520 | 2525 | test_target_filters: []const []const u8, |
| 2521 | 2526 | skip_non_native: bool, |
| 2527 | skip_wasm: bool, | |
| 2522 | 2528 | skip_freebsd: bool, |
| 2523 | 2529 | skip_netbsd: bool, |
| 2524 | 2530 | skip_windows: bool, |
| ... | ... | @@ -2538,6 +2544,9 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step { |
| 2538 | 2544 | |
| 2539 | 2545 | for (c_abi_targets) |c_abi_target| { |
| 2540 | 2546 | if (options.skip_non_native and !c_abi_target.target.isNative()) continue; |
| 2547 | ||
| 2548 | if (options.skip_wasm and c_abi_target.target.cpu_arch != null and c_abi_target.target.cpu_arch.?.isWasm()) continue; | |
| 2549 | ||
| 2541 | 2550 | if (options.skip_freebsd and c_abi_target.target.os_tag == .freebsd) continue; |
| 2542 | 2551 | if (options.skip_netbsd and c_abi_target.target.os_tag == .netbsd) continue; |
| 2543 | 2552 | if (options.skip_windows and c_abi_target.target.os_tag == .windows) continue; |