authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-12-01 07:43:31+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-05 16:50:46+01:00
log00dc4d000f03d763e0e49b05ff29534c82d21b69
tree503f917366cf73419ead84da7eb2ec6e991948b2
parent25e348973a5f9df9218d25502e31ecec9341241e
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: add openbsd targets to module test matrix


3 files changed, 96 insertions(+), 0 deletions(-)

build.zig+7
...@@ -97,6 +97,7 @@ pub fn build(b: *std.Build) !void {...@@ -97,6 +97,7 @@ pub fn build(b: *std.Build) !void {
97 const skip_wasm = b.option(bool, "skip-wasm", "Main test suite skips targets with wasm32/wasm64 architecture") orelse false;97 const skip_wasm = b.option(bool, "skip-wasm", "Main test suite skips targets with wasm32/wasm64 architecture") orelse false;
98 const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;98 const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
99 const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;99 const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
100 const skip_openbsd = b.option(bool, "skip-openbsd", "Main test suite skips targets with openbsd OS") orelse false;
100 const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;101 const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
101 const skip_darwin = b.option(bool, "skip-darwin", "Main test suite skips targets with darwin OSs") orelse false;102 const skip_darwin = b.option(bool, "skip-darwin", "Main test suite skips targets with darwin OSs") orelse false;
102 const skip_linux = b.option(bool, "skip-linux", "Main test suite skips targets with linux OS") orelse false;103 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 {...@@ -431,6 +432,7 @@ pub fn build(b: *std.Build) !void {
431 .skip_wasm = skip_wasm,432 .skip_wasm = skip_wasm,
432 .skip_freebsd = skip_freebsd,433 .skip_freebsd = skip_freebsd,
433 .skip_netbsd = skip_netbsd,434 .skip_netbsd = skip_netbsd,
435 .skip_openbsd = skip_openbsd,
434 .skip_windows = skip_windows,436 .skip_windows = skip_windows,
435 .skip_darwin = skip_darwin,437 .skip_darwin = skip_darwin,
436 .skip_linux = skip_linux,438 .skip_linux = skip_linux,
...@@ -464,6 +466,7 @@ pub fn build(b: *std.Build) !void {...@@ -464,6 +466,7 @@ pub fn build(b: *std.Build) !void {
464 .skip_wasm = skip_wasm,466 .skip_wasm = skip_wasm,
465 .skip_freebsd = skip_freebsd,467 .skip_freebsd = skip_freebsd,
466 .skip_netbsd = skip_netbsd,468 .skip_netbsd = skip_netbsd,
469 .skip_openbsd = skip_openbsd,
467 .skip_windows = skip_windows,470 .skip_windows = skip_windows,
468 .skip_darwin = skip_darwin,471 .skip_darwin = skip_darwin,
469 .skip_linux = skip_linux,472 .skip_linux = skip_linux,
...@@ -508,6 +511,7 @@ pub fn build(b: *std.Build) !void {...@@ -508,6 +511,7 @@ pub fn build(b: *std.Build) !void {
508 .skip_wasm = skip_wasm,511 .skip_wasm = skip_wasm,
509 .skip_freebsd = skip_freebsd,512 .skip_freebsd = skip_freebsd,
510 .skip_netbsd = skip_netbsd,513 .skip_netbsd = skip_netbsd,
514 .skip_openbsd = skip_openbsd,
511 .skip_windows = skip_windows,515 .skip_windows = skip_windows,
512 .skip_darwin = skip_darwin,516 .skip_darwin = skip_darwin,
513 .skip_linux = skip_linux,517 .skip_linux = skip_linux,
...@@ -552,6 +556,7 @@ pub fn build(b: *std.Build) !void {...@@ -552,6 +556,7 @@ pub fn build(b: *std.Build) !void {
552 .skip_wasm = skip_wasm,556 .skip_wasm = skip_wasm,
553 .skip_freebsd = skip_freebsd,557 .skip_freebsd = skip_freebsd,
554 .skip_netbsd = skip_netbsd,558 .skip_netbsd = skip_netbsd,
559 .skip_openbsd = skip_openbsd,
555 .skip_windows = skip_windows,560 .skip_windows = skip_windows,
556 .skip_darwin = skip_darwin,561 .skip_darwin = skip_darwin,
557 .skip_linux = skip_linux,562 .skip_linux = skip_linux,
...@@ -577,6 +582,7 @@ pub fn build(b: *std.Build) !void {...@@ -577,6 +582,7 @@ pub fn build(b: *std.Build) !void {
577 .skip_wasm = skip_wasm,582 .skip_wasm = skip_wasm,
578 .skip_freebsd = skip_freebsd,583 .skip_freebsd = skip_freebsd,
579 .skip_netbsd = skip_netbsd,584 .skip_netbsd = skip_netbsd,
585 .skip_openbsd = skip_openbsd,
580 .skip_windows = skip_windows,586 .skip_windows = skip_windows,
581 .skip_darwin = skip_darwin,587 .skip_darwin = skip_darwin,
582 .skip_linux = skip_linux,588 .skip_linux = skip_linux,
...@@ -642,6 +648,7 @@ pub fn build(b: *std.Build) !void {...@@ -642,6 +648,7 @@ pub fn build(b: *std.Build) !void {
642 .skip_wasm = skip_wasm,648 .skip_wasm = skip_wasm,
643 .skip_freebsd = skip_freebsd,649 .skip_freebsd = skip_freebsd,
644 .skip_netbsd = skip_netbsd,650 .skip_netbsd = skip_netbsd,
651 .skip_openbsd = skip_openbsd,
645 .skip_windows = skip_windows,652 .skip_windows = skip_windows,
646 .skip_darwin = skip_darwin,653 .skip_darwin = skip_darwin,
647 .skip_linux = skip_linux,654 .skip_linux = skip_linux,
test/src/Cases.zig+2
...@@ -455,6 +455,7 @@ pub const CaseTestOptions = struct {...@@ -455,6 +455,7 @@ pub const CaseTestOptions = struct {
455 skip_wasm: bool,455 skip_wasm: bool,
456 skip_freebsd: bool,456 skip_freebsd: bool,
457 skip_netbsd: bool,457 skip_netbsd: bool,
458 skip_openbsd: bool,
458 skip_windows: bool,459 skip_windows: bool,
459 skip_darwin: bool,460 skip_darwin: bool,
460 skip_linux: bool,461 skip_linux: bool,
...@@ -487,6 +488,7 @@ pub fn lowerToBuildSteps(...@@ -487,6 +488,7 @@ pub fn lowerToBuildSteps(
487488
488 if (options.skip_freebsd and case.target.query.os_tag == .freebsd) continue;489 if (options.skip_freebsd and case.target.query.os_tag == .freebsd) continue;
489 if (options.skip_netbsd and case.target.query.os_tag == .netbsd) continue;490 if (options.skip_netbsd and case.target.query.os_tag == .netbsd) continue;
491 if (options.skip_openbsd and case.target.query.os_tag == .openbsd) continue;
490 if (options.skip_windows and case.target.query.os_tag == .windows) continue;492 if (options.skip_windows and case.target.query.os_tag == .windows) continue;
491 if (options.skip_darwin and case.target.query.os_tag != null and case.target.query.os_tag.?.isDarwin()) continue;493 if (options.skip_darwin and case.target.query.os_tag != null and case.target.query.os_tag.?.isDarwin()) continue;
492 if (options.skip_linux and case.target.query.os_tag == .linux) continue;494 if (options.skip_linux and case.target.query.os_tag == .linux) continue;
test/tests.zig+87
...@@ -1366,6 +1366,89 @@ const test_targets = blk: {...@@ -1366,6 +1366,89 @@ const test_targets = blk: {
1366 .link_libc = true,1366 .link_libc = true,
1367 },1367 },
13681368
1369 // OpenBSD Targets
1370
1371 .{
1372 .target = .{
1373 .cpu_arch = .aarch64,
1374 .os_tag = .openbsd,
1375 .abi = .none,
1376 },
1377 .link_libc = true,
1378 },
1379
1380 .{
1381 .target = .{
1382 .cpu_arch = .arm,
1383 .os_tag = .openbsd,
1384 .abi = .eabi,
1385 },
1386 .link_libc = true,
1387 },
1388
1389 .{
1390 .target = .{
1391 .cpu_arch = .mips64,
1392 .os_tag = .openbsd,
1393 .abi = .none,
1394 },
1395 .link_libc = true,
1396 },
1397
1398 .{
1399 .target = .{
1400 .cpu_arch = .mips64el,
1401 .os_tag = .openbsd,
1402 .abi = .none,
1403 },
1404 .link_libc = true,
1405 },
1406
1407 .{
1408 .target = .{
1409 .cpu_arch = .powerpc,
1410 .os_tag = .openbsd,
1411 .abi = .eabihf,
1412 },
1413 .link_libc = true,
1414 },
1415
1416 .{
1417 .target = .{
1418 .cpu_arch = .powerpc64,
1419 .os_tag = .openbsd,
1420 .abi = .none,
1421 },
1422 .link_libc = true,
1423 },
1424
1425 .{
1426 .target = .{
1427 .cpu_arch = .riscv64,
1428 .os_tag = .openbsd,
1429 .abi = .none,
1430 },
1431 .link_libc = true,
1432 },
1433
1434 .{
1435 .target = .{
1436 .cpu_arch = .x86,
1437 .os_tag = .openbsd,
1438 .abi = .none,
1439 },
1440 .link_libc = true,
1441 },
1442
1443 .{
1444 .target = .{
1445 .cpu_arch = .x86_64,
1446 .os_tag = .openbsd,
1447 .abi = .none,
1448 },
1449 .link_libc = true,
1450 },
1451
1369 // SPIR-V Targets1452 // SPIR-V Targets
13701453
1371 // Disabled due to no active maintainer (feel free to fix the failures1454 // Disabled due to no active maintainer (feel free to fix the failures
...@@ -2233,6 +2316,7 @@ const ModuleTestOptions = struct {...@@ -2233,6 +2316,7 @@ const ModuleTestOptions = struct {
2233 skip_wasm: bool,2316 skip_wasm: bool,
2234 skip_freebsd: bool,2317 skip_freebsd: bool,
2235 skip_netbsd: bool,2318 skip_netbsd: bool,
2319 skip_openbsd: bool,
2236 skip_windows: bool,2320 skip_windows: bool,
2237 skip_darwin: bool,2321 skip_darwin: bool,
2238 skip_linux: bool,2322 skip_linux: bool,
...@@ -2271,6 +2355,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {...@@ -2271,6 +2355,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
22712355
2272 if (options.skip_freebsd and test_target.target.os_tag == .freebsd) continue;2356 if (options.skip_freebsd and test_target.target.os_tag == .freebsd) continue;
2273 if (options.skip_netbsd and test_target.target.os_tag == .netbsd) continue;2357 if (options.skip_netbsd and test_target.target.os_tag == .netbsd) continue;
2358 if (options.skip_openbsd and test_target.target.os_tag == .openbsd) continue;
2274 if (options.skip_windows and test_target.target.os_tag == .windows) continue;2359 if (options.skip_windows and test_target.target.os_tag == .windows) continue;
2275 if (options.skip_darwin and test_target.target.os_tag != null and test_target.target.os_tag.?.isDarwin()) continue;2360 if (options.skip_darwin and test_target.target.os_tag != null and test_target.target.os_tag.?.isDarwin()) continue;
2276 if (options.skip_linux and test_target.target.os_tag == .linux) continue;2361 if (options.skip_linux and test_target.target.os_tag == .linux) continue;
...@@ -2513,6 +2598,7 @@ const CAbiTestOptions = struct {...@@ -2513,6 +2598,7 @@ const CAbiTestOptions = struct {
2513 skip_wasm: bool,2598 skip_wasm: bool,
2514 skip_freebsd: bool,2599 skip_freebsd: bool,
2515 skip_netbsd: bool,2600 skip_netbsd: bool,
2601 skip_openbsd: bool,
2516 skip_windows: bool,2602 skip_windows: bool,
2517 skip_darwin: bool,2603 skip_darwin: bool,
2518 skip_linux: bool,2604 skip_linux: bool,
...@@ -2536,6 +2622,7 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {...@@ -2536,6 +2622,7 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {
25362622
2537 if (options.skip_freebsd and c_abi_target.target.os_tag == .freebsd) continue;2623 if (options.skip_freebsd and c_abi_target.target.os_tag == .freebsd) continue;
2538 if (options.skip_netbsd and c_abi_target.target.os_tag == .netbsd) continue;2624 if (options.skip_netbsd and c_abi_target.target.os_tag == .netbsd) continue;
2625 if (options.skip_openbsd and c_abi_target.target.os_tag == .openbsd) continue;
2539 if (options.skip_windows and c_abi_target.target.os_tag == .windows) continue;2626 if (options.skip_windows and c_abi_target.target.os_tag == .windows) continue;
2540 if (options.skip_darwin and c_abi_target.target.os_tag != null and c_abi_target.target.os_tag.?.isDarwin()) continue;2627 if (options.skip_darwin and c_abi_target.target.os_tag != null and c_abi_target.target.os_tag.?.isDarwin()) continue;
2541 if (options.skip_linux and c_abi_target.target.os_tag == .linux) continue;2628 if (options.skip_linux and c_abi_target.target.os_tag == .linux) continue;