test: add openbsd targets to module test matrix

This commit is contained in:
Alex Rønne Petersen
2025-12-01 07:43:31 +01:00
parent 25e348973a
commit 00dc4d000f
3 changed files with 96 additions and 0 deletions
+7
View File
@@ -97,6 +97,7 @@ pub fn build(b: *std.Build) !void {
const skip_wasm = b.option(bool, "skip-wasm", "Main test suite skips targets with wasm32/wasm64 architecture") orelse false;
const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
const skip_openbsd = b.option(bool, "skip-openbsd", "Main test suite skips targets with openbsd OS") orelse false;
const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
const skip_darwin = b.option(bool, "skip-darwin", "Main test suite skips targets with darwin OSs") orelse false;
const skip_linux = b.option(bool, "skip-linux", "Main test suite skips targets with linux OS") orelse false;
@@ -431,6 +432,7 @@ pub fn build(b: *std.Build) !void {
.skip_wasm = skip_wasm,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_openbsd = skip_openbsd,
.skip_windows = skip_windows,
.skip_darwin = skip_darwin,
.skip_linux = skip_linux,
@@ -464,6 +466,7 @@ pub fn build(b: *std.Build) !void {
.skip_wasm = skip_wasm,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_openbsd = skip_openbsd,
.skip_windows = skip_windows,
.skip_darwin = skip_darwin,
.skip_linux = skip_linux,
@@ -508,6 +511,7 @@ pub fn build(b: *std.Build) !void {
.skip_wasm = skip_wasm,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_openbsd = skip_openbsd,
.skip_windows = skip_windows,
.skip_darwin = skip_darwin,
.skip_linux = skip_linux,
@@ -552,6 +556,7 @@ pub fn build(b: *std.Build) !void {
.skip_wasm = skip_wasm,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_openbsd = skip_openbsd,
.skip_windows = skip_windows,
.skip_darwin = skip_darwin,
.skip_linux = skip_linux,
@@ -577,6 +582,7 @@ pub fn build(b: *std.Build) !void {
.skip_wasm = skip_wasm,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_openbsd = skip_openbsd,
.skip_windows = skip_windows,
.skip_darwin = skip_darwin,
.skip_linux = skip_linux,
@@ -642,6 +648,7 @@ pub fn build(b: *std.Build) !void {
.skip_wasm = skip_wasm,
.skip_freebsd = skip_freebsd,
.skip_netbsd = skip_netbsd,
.skip_openbsd = skip_openbsd,
.skip_windows = skip_windows,
.skip_darwin = skip_darwin,
.skip_linux = skip_linux,
+2
View File
@@ -455,6 +455,7 @@ pub const CaseTestOptions = struct {
skip_wasm: bool,
skip_freebsd: bool,
skip_netbsd: bool,
skip_openbsd: bool,
skip_windows: bool,
skip_darwin: bool,
skip_linux: bool,
@@ -487,6 +488,7 @@ pub fn lowerToBuildSteps(
if (options.skip_freebsd and case.target.query.os_tag == .freebsd) continue;
if (options.skip_netbsd and case.target.query.os_tag == .netbsd) continue;
if (options.skip_openbsd and case.target.query.os_tag == .openbsd) continue;
if (options.skip_windows and case.target.query.os_tag == .windows) continue;
if (options.skip_darwin and case.target.query.os_tag != null and case.target.query.os_tag.?.isDarwin()) continue;
if (options.skip_linux and case.target.query.os_tag == .linux) continue;
+87
View File
@@ -1366,6 +1366,89 @@ const test_targets = blk: {
.link_libc = true,
},
// OpenBSD Targets
.{
.target = .{
.cpu_arch = .aarch64,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .arm,
.os_tag = .openbsd,
.abi = .eabi,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .mips64,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .mips64el,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .powerpc,
.os_tag = .openbsd,
.abi = .eabihf,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .powerpc64,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .riscv64,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .x86,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
.{
.target = .{
.cpu_arch = .x86_64,
.os_tag = .openbsd,
.abi = .none,
},
.link_libc = true,
},
// SPIR-V Targets
// Disabled due to no active maintainer (feel free to fix the failures
@@ -2233,6 +2316,7 @@ const ModuleTestOptions = struct {
skip_wasm: bool,
skip_freebsd: bool,
skip_netbsd: bool,
skip_openbsd: bool,
skip_windows: bool,
skip_darwin: bool,
skip_linux: bool,
@@ -2271,6 +2355,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
if (options.skip_freebsd and test_target.target.os_tag == .freebsd) continue;
if (options.skip_netbsd and test_target.target.os_tag == .netbsd) continue;
if (options.skip_openbsd and test_target.target.os_tag == .openbsd) continue;
if (options.skip_windows and test_target.target.os_tag == .windows) continue;
if (options.skip_darwin and test_target.target.os_tag != null and test_target.target.os_tag.?.isDarwin()) continue;
if (options.skip_linux and test_target.target.os_tag == .linux) continue;
@@ -2513,6 +2598,7 @@ const CAbiTestOptions = struct {
skip_wasm: bool,
skip_freebsd: bool,
skip_netbsd: bool,
skip_openbsd: bool,
skip_windows: bool,
skip_darwin: bool,
skip_linux: bool,
@@ -2536,6 +2622,7 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {
if (options.skip_freebsd and c_abi_target.target.os_tag == .freebsd) continue;
if (options.skip_netbsd and c_abi_target.target.os_tag == .netbsd) continue;
if (options.skip_openbsd and c_abi_target.target.os_tag == .openbsd) continue;
if (options.skip_windows and c_abi_target.target.os_tag == .windows) continue;
if (options.skip_darwin and c_abi_target.target.os_tag != null and c_abi_target.target.os_tag.?.isDarwin()) continue;
if (options.skip_linux and c_abi_target.target.os_tag == .linux) continue;