authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-23 11:03:41+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-23 11:04:37+02:00
log457e906bb36f416627ae142c5add5e95ec803582
treedb256b951dfd60b5f5cdcfded9ee65d2cf7f1769
parentfb255db0adc7fb39f4d33738fcf3c5831a1a7649
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

build: add -Dskip-cbe option for skipping CBE tests


2 files changed, 15 insertions(+), 0 deletions(-)

build.zig+7
......@@ -129,6 +129,7 @@ pub fn build(b: *std.Build) !void {
129129 const skip_darwin = b.option(bool, "skip-darwin", "Main test suite skips targets with darwin OSs") orelse false;
130130 const skip_linux = b.option(bool, "skip-linux", "Main test suite skips targets with linux OS") orelse false;
131131 const skip_llvm = b.option(bool, "skip-llvm", "Main test suite skips targets that use LLVM backend") orelse false;
132 const skip_cbe = b.option(bool, "skip-cbe", "Main test suite skips targets that use C backend") orelse false;
132133
133134 const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
134135
......@@ -532,6 +533,7 @@ pub fn build(b: *std.Build) !void {
532533 .skip_darwin = skip_darwin,
533534 .skip_linux = skip_linux,
534535 .skip_llvm = skip_llvm,
536 .skip_cbe = skip_cbe,
535537 .skip_libc = skip_libc,
536538 .max_rss = 4_000_000_000,
537539 }));
......@@ -558,6 +560,7 @@ pub fn build(b: *std.Build) !void {
558560 .skip_darwin = skip_darwin,
559561 .skip_linux = skip_linux,
560562 .skip_llvm = skip_llvm,
563 .skip_cbe = skip_cbe,
561564 .skip_libc = true,
562565 .no_builtin = true,
563566 .max_rss = 4_000_000_000,
......@@ -585,6 +588,7 @@ pub fn build(b: *std.Build) !void {
585588 .skip_darwin = skip_darwin,
586589 .skip_linux = skip_linux,
587590 .skip_llvm = skip_llvm,
591 .skip_cbe = skip_cbe,
588592 .skip_libc = skip_libc,
589593 .max_rss = 9_600_000_000,
590594 }));
......@@ -611,6 +615,7 @@ pub fn build(b: *std.Build) !void {
611615 .skip_darwin = skip_darwin,
612616 .skip_linux = skip_linux,
613617 .skip_llvm = skip_llvm,
618 .skip_cbe = skip_cbe,
614619 .skip_libc = skip_libc,
615620 .no_builtin = true,
616621 .max_rss = 4_000_000_000,
......@@ -658,6 +663,7 @@ pub fn build(b: *std.Build) !void {
658663 .skip_darwin = skip_darwin,
659664 .skip_linux = skip_linux,
660665 .skip_llvm = skip_llvm,
666 .skip_cbe = skip_cbe,
661667 .max_rss = 4_300_000_000,
662668 }));
663669 test_step.dependOn(tests.addLinkTests(b, .{
......@@ -798,6 +804,7 @@ pub fn build(b: *std.Build) !void {
798804 .skip_darwin = skip_darwin,
799805 .skip_linux = skip_linux,
800806 .skip_llvm = skip_llvm,
807 .skip_cbe = skip_cbe,
801808 .llvm_has_m68k = llvm_has_m68k,
802809 .llvm_has_csky = llvm_has_csky,
803810 .llvm_has_arc = llvm_has_arc,
test/tests.zig+8
......@@ -2508,6 +2508,7 @@ pub const ModuleTestOptions = struct {
25082508 skip_darwin: bool,
25092509 skip_linux: bool,
25102510 skip_llvm: bool,
2511 skip_cbe: bool,
25112512 skip_libc: bool,
25122513 max_rss: u64 = 0,
25132514 no_builtin: bool = false,
......@@ -2579,6 +2580,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
25792580
25802581 const would_use_llvm = wouldUseLlvm(test_target.use_llvm, test_target.target, test_target.optimize_mode);
25812582 if (options.skip_llvm and would_use_llvm) continue;
2583 if (options.skip_cbe and target.ofmt == .c) continue;
25822584
25832585 const triple_txt = resolved_target.query.zigTriple(b.allocator) catch @panic("OOM");
25842586
......@@ -2854,6 +2856,7 @@ const CAbiTestOptions = struct {
28542856 skip_darwin: bool,
28552857 skip_linux: bool,
28562858 skip_llvm: bool,
2859 skip_cbe: bool,
28572860 max_rss: u64 = 0,
28582861};
28592862
......@@ -2886,6 +2889,7 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {
28862889 for (options.optimize_modes) |optimize_mode| {
28872890 const would_use_llvm = wouldUseLlvm(c_abi_target.use_llvm, c_abi_target.target, optimize_mode);
28882891 if (options.skip_llvm and would_use_llvm) continue;
2892 if (options.skip_cbe and target.ofmt == .c) continue;
28892893
28902894 const test_mod = b.createModule(.{
28912895 .root_source_file = b.path("test/c_abi/main.zig"),
......@@ -3071,6 +3075,7 @@ pub const RunnerOptions = struct {
30713075 skip_darwin: bool,
30723076 skip_linux: bool,
30733077 skip_llvm: bool,
3078 skip_cbe: bool,
30743079 llvm_has_m68k: bool,
30753080 llvm_has_csky: bool,
30763081 llvm_has_arc: bool,
......@@ -3147,6 +3152,9 @@ pub fn addRunnerTests(
31473152 .xtensa => if (!options.llvm_has_xtensa) continue,
31483153 }
31493154 }
3155 if (test_target.backend == .cbe) {
3156 if (options.skip_cbe) continue;
3157 }
31503158
31513159 const target_str = b.fmt("{f}", .{test_target});
31523160