mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 06:15:21 +00:00
test: Add the ability to skip specific modules for a target.
This commit is contained in:
parent
3a2647b7d3
commit
d89cf3e7d8
@ -28,6 +28,7 @@ const TestTarget = struct {
|
||||
use_lld: ?bool = null,
|
||||
pic: ?bool = null,
|
||||
strip: ?bool = null,
|
||||
skip_modules: []const []const u8 = &.{},
|
||||
|
||||
// This is intended for targets that are known to be slow to compile. These are acceptable to
|
||||
// run in CI, but should not be run on developer machines by default. As an example, at the time
|
||||
@ -1225,7 +1226,13 @@ const ModuleTestOptions = struct {
|
||||
pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
|
||||
const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc);
|
||||
|
||||
for (test_targets) |test_target| {
|
||||
for_targets: for (test_targets) |test_target| {
|
||||
if (test_target.skip_modules.len > 0) {
|
||||
for (test_target.skip_modules) |skip_mod| {
|
||||
if (std.mem.eql(u8, options.name, skip_mod)) continue :for_targets;
|
||||
}
|
||||
}
|
||||
|
||||
if (!options.test_slow_targets and test_target.slow_backend) continue;
|
||||
|
||||
if (options.skip_non_native and !test_target.target.isNative())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user