mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
build/test: Add a test-modules step for running all the per-target tests.
This is useful during porting work where you're mainly concerned with tests that e.g. run under QEMU. Combine with the new -Dtest-target-filter for an even more streamlined workflow.
This commit is contained in:
parent
b6009a7416
commit
927bc55629
1 changed files with 23 additions and 18 deletions
41
build.zig
41
build.zig
|
|
@ -457,7 +457,9 @@ pub fn build(b: *std.Build) !void {
|
|||
});
|
||||
test_step.dependOn(test_cases_step);
|
||||
|
||||
test_step.dependOn(tests.addModuleTests(b, .{
|
||||
const test_modules_step = b.step("test-modules", "Run the per-target module tests");
|
||||
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_slow_targets = test_slow_targets,
|
||||
|
|
@ -472,7 +474,7 @@ pub fn build(b: *std.Build) !void {
|
|||
.max_rss = 1 * 1024 * 1024 * 1024,
|
||||
}));
|
||||
|
||||
test_step.dependOn(tests.addModuleTests(b, .{
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_slow_targets = test_slow_targets,
|
||||
|
|
@ -486,7 +488,7 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_libc = skip_libc,
|
||||
}));
|
||||
|
||||
test_step.dependOn(tests.addModuleTests(b, .{
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_slow_targets = test_slow_targets,
|
||||
|
|
@ -501,7 +503,7 @@ pub fn build(b: *std.Build) !void {
|
|||
.no_builtin = true,
|
||||
}));
|
||||
|
||||
test_step.dependOn(tests.addModuleTests(b, .{
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_slow_targets = test_slow_targets,
|
||||
|
|
@ -516,20 +518,7 @@ pub fn build(b: *std.Build) !void {
|
|||
.no_builtin = true,
|
||||
}));
|
||||
|
||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addStandaloneTests(
|
||||
b,
|
||||
optimization_modes,
|
||||
enable_macos_sdk,
|
||||
enable_ios_sdk,
|
||||
enable_symlinks_windows,
|
||||
));
|
||||
test_step.dependOn(tests.addCAbiTests(b, skip_non_native, skip_release));
|
||||
test_step.dependOn(tests.addLinkTests(b, enable_macos_sdk, enable_ios_sdk, enable_symlinks_windows));
|
||||
test_step.dependOn(tests.addStackTraceTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addCliTests(b));
|
||||
test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addModuleTests(b, .{
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_slow_targets = test_slow_targets,
|
||||
|
|
@ -545,6 +534,22 @@ pub fn build(b: *std.Build) !void {
|
|||
.max_rss = 5029889638,
|
||||
}));
|
||||
|
||||
test_step.dependOn(test_modules_step);
|
||||
|
||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addStandaloneTests(
|
||||
b,
|
||||
optimization_modes,
|
||||
enable_macos_sdk,
|
||||
enable_ios_sdk,
|
||||
enable_symlinks_windows,
|
||||
));
|
||||
test_step.dependOn(tests.addCAbiTests(b, skip_non_native, skip_release));
|
||||
test_step.dependOn(tests.addLinkTests(b, enable_macos_sdk, enable_ios_sdk, enable_symlinks_windows));
|
||||
test_step.dependOn(tests.addStackTraceTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addCliTests(b));
|
||||
test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes));
|
||||
|
||||
try addWasiUpdateStep(b, version);
|
||||
|
||||
const update_mingw_step = b.step("update-mingw", "Update zig's bundled mingw");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue