| ... | @@ -379,6 +379,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -379,6 +379,7 @@ pub fn build(b: *std.Build) !void { |
| 379 | } | 379 | } |
| 380 | | 380 | |
| 381 | const test_filters = b.option([]const []const u8, "test-filter", "Skip tests that do not match any filter") orelse &[0][]const u8{}; | 381 | const test_filters = b.option([]const []const u8, "test-filter", "Skip tests that do not match any filter") orelse &[0][]const u8{}; |
| | 382 | const test_target_filters = b.option([]const []const u8, "test-target-filter", "Skip tests whose target triple do not match any filter") orelse &[0][]const u8{}; |
| 382 | | 383 | |
| 383 | const test_cases_options = b.addOptions(); | 384 | const test_cases_options = b.addOptions(); |
| 384 | | 385 | |
| ... | @@ -457,6 +458,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -457,6 +458,7 @@ pub fn build(b: *std.Build) !void { |
| 457 | | 458 | |
| 458 | test_step.dependOn(tests.addModuleTests(b, .{ | 459 | test_step.dependOn(tests.addModuleTests(b, .{ |
| 459 | .test_filters = test_filters, | 460 | .test_filters = test_filters, |
| | 461 | .test_target_filters = test_target_filters, |
| 460 | .root_src = "test/behavior.zig", | 462 | .root_src = "test/behavior.zig", |
| 461 | .name = "behavior", | 463 | .name = "behavior", |
| 462 | .desc = "Run the behavior tests", | 464 | .desc = "Run the behavior tests", |
| ... | @@ -470,6 +472,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -470,6 +472,7 @@ pub fn build(b: *std.Build) !void { |
| 470 | | 472 | |
| 471 | test_step.dependOn(tests.addModuleTests(b, .{ | 473 | test_step.dependOn(tests.addModuleTests(b, .{ |
| 472 | .test_filters = test_filters, | 474 | .test_filters = test_filters, |
| | 475 | .test_target_filters = test_target_filters, |
| 473 | .root_src = "test/c_import.zig", | 476 | .root_src = "test/c_import.zig", |
| 474 | .name = "c-import", | 477 | .name = "c-import", |
| 475 | .desc = "Run the @cImport tests", | 478 | .desc = "Run the @cImport tests", |
| ... | @@ -482,6 +485,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -482,6 +485,7 @@ pub fn build(b: *std.Build) !void { |
| 482 | | 485 | |
| 483 | test_step.dependOn(tests.addModuleTests(b, .{ | 486 | test_step.dependOn(tests.addModuleTests(b, .{ |
| 484 | .test_filters = test_filters, | 487 | .test_filters = test_filters, |
| | 488 | .test_target_filters = test_target_filters, |
| 485 | .root_src = "lib/compiler_rt.zig", | 489 | .root_src = "lib/compiler_rt.zig", |
| 486 | .name = "compiler-rt", | 490 | .name = "compiler-rt", |
| 487 | .desc = "Run the compiler_rt tests", | 491 | .desc = "Run the compiler_rt tests", |
| ... | @@ -495,6 +499,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -495,6 +499,7 @@ pub fn build(b: *std.Build) !void { |
| 495 | | 499 | |
| 496 | test_step.dependOn(tests.addModuleTests(b, .{ | 500 | test_step.dependOn(tests.addModuleTests(b, .{ |
| 497 | .test_filters = test_filters, | 501 | .test_filters = test_filters, |
| | 502 | .test_target_filters = test_target_filters, |
| 498 | .root_src = "lib/c.zig", | 503 | .root_src = "lib/c.zig", |
| 499 | .name = "universal-libc", | 504 | .name = "universal-libc", |
| 500 | .desc = "Run the universal libc tests", | 505 | .desc = "Run the universal libc tests", |
| ... | @@ -521,6 +526,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -521,6 +526,7 @@ pub fn build(b: *std.Build) !void { |
| 521 | test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes)); | 526 | test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes)); |
| 522 | test_step.dependOn(tests.addModuleTests(b, .{ | 527 | test_step.dependOn(tests.addModuleTests(b, .{ |
| 523 | .test_filters = test_filters, | 528 | .test_filters = test_filters, |
| | 529 | .test_target_filters = test_target_filters, |
| 524 | .root_src = "lib/std/std.zig", | 530 | .root_src = "lib/std/std.zig", |
| 525 | .name = "std", | 531 | .name = "std", |
| 526 | .desc = "Run the standard library tests", | 532 | .desc = "Run the standard library tests", |