authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-30 23:02:54+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-31 02:05:57+02:00
loga0e17b82c8ebab4d78ca8b16748246870fff2ec4
treea9bc1f623c97b6825d0061c866e68d6d2052f02d
parent079f9e65d282781646bdf47b690cf9e0d179c198

test-cases: default target to native,wasm32-wasi

The old logic was picking an arbitrary (and very incomplete) set of targets as the default. Rather than try to make that set sensible, just limit it to native and wasm32-wasi - the former because we have real CI machines for most of the non-Wasm targets that were here previously, and the latter because Wasm is obviously not a host target. This only affected 27 tests, as far as I can tell: test/cases/ambiguous_reference.zig test/cases/compile_error.zig test/cases/comptime_aggregate_print.zig test/cases/decl_value_arena.zig test/cases/default_value_references_comptime_var.zig test/cases/disable_stack_tracing.zig test/cases/error_union_variant_is_runtime_known.zig test/cases/fn_typeinfo_passed_to_comptime_fn.zig test/cases/function_redeclaration.zig test/cases/global_variable_redeclaration.zig test/cases/inherit_want_safety.zig test/cases/inner_func_accessing_outer_var.zig test/cases/maximum_sized_integer_literal.zig test/cases/no_compile_panic_for_unchecked_arith.zig test/cases/non_leaf_functions.zig test/cases/passing_u0_to_function.zig test/cases/returning_undefined_sentinel_terminated_const_u8_slice.zig test/cases/returns_in_try.zig test/cases/runtime_bitwise_and.zig test/cases/runtime_bitwise_or.zig test/cases/save_function_return_values_in_callee_preserved_register.zig test/cases/sentinel_references_comptime_var.zig test/cases/setting_an_address_space_on_a_local_variable.zig test/cases/try_in_comptime_in_struct_in_test.zig test/cases/type_names.zig test/cases/union_unresolved_layout.zig test/cases/unused_vars.zig

1 files changed, 1 insertions(+), 19 deletions(-)

test/src/Cases.zig+1-19
......@@ -677,25 +677,7 @@ const TestManifestConfigDefaults = struct {
677677 if (@"type" == .@"error") {
678678 return "native";
679679 }
680 return comptime blk: {
681 var defaults: []const u8 = "";
682 // TODO should we only return "mainstream" targets by default here?
683 // TODO we should also specify ABIs explicitly as the backends are
684 // getting more and more complete
685 // Linux
686 for (&[_][]const u8{ "x86_64", "arm", "aarch64" }) |arch| {
687 defaults = defaults ++ arch ++ "-linux" ++ ",";
688 }
689 // macOS
690 for (&[_][]const u8{"aarch64"}) |arch| {
691 defaults = defaults ++ arch ++ "-macos" ++ ",";
692 }
693 // Windows
694 defaults = defaults ++ "x86_64-windows" ++ ",";
695 // Wasm
696 defaults = defaults ++ "wasm32-wasi";
697 break :blk defaults;
698 };
680 return "native,wasm32-wasi";
699681 } else if (std.mem.eql(u8, key, "output_mode")) {
700682 return switch (@"type") {
701683 .@"error" => "Obj",