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 fbe76b31cf
commit 82235aeb6c
No known key found for this signature in database
3 changed files with 96 additions and 0 deletions

View file

@ -95,6 +95,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;
@ -427,6 +428,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,
@ -460,6 +462,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,
@ -506,6 +509,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,
@ -553,6 +557,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,
@ -600,6 +605,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,
@ -686,6 +692,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,

View file

@ -448,6 +448,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,
@ -479,6 +480,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;

View file

@ -1364,6 +1364,89 @@ const test_targets = blk: {
.link_libc = true,
},
// NetBSD 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
@ -2250,6 +2333,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,
@ -2288,6 +2372,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;
@ -2530,6 +2615,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,
@ -2553,6 +2639,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;