authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-30 16:27:23+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-07 00:30:52+02:00
log19413602e0de317692cf8f74257e8eb3f6a28b66
tree442695a605ea256b97cc298ad0d2ff0e0d92e9bc
parent265f3dd10f11a378afb2a5836afcf9d5ee9a4172
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test-libc-nsz: include target triple in run step name


1 files changed, 3 insertions(+), 2 deletions(-)

test/src/Libc.zig+3-2
...@@ -45,8 +45,9 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {...@@ -45,8 +45,9 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
45 } else false;45 } else false;
46 if (!want_debug) return;46 if (!want_debug) return;
4747
48 const triple_txt = target.query.zigTriple(libc.b.allocator) catch @panic("OOM");
49
48 if (libc.options.test_target_filters.len > 0) {50 if (libc.options.test_target_filters.len > 0) {
49 const triple_txt = target.query.zigTriple(libc.b.allocator) catch @panic("OOM");
50 for (libc.options.test_target_filters) |filter| {51 for (libc.options.test_target_filters) |filter| {
51 if (std.mem.find(u8, triple_txt, filter)) |_| break;52 if (std.mem.find(u8, triple_txt, filter)) |_| break;
52 } else return;53 } else return;
...@@ -75,7 +76,7 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {...@@ -75,7 +76,7 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
75 });76 });
7677
77 for (libc.test_cases.items) |*test_case| {78 for (libc.test_cases.items) |*test_case| {
78 const annotated_case_name = libc.b.fmt("run libc-test {s}", .{test_case.name});79 const annotated_case_name = libc.b.fmt("run libc-test {s} ({s})", .{ test_case.name, triple_txt });
79 for (libc.options.test_filters) |test_filter| {80 for (libc.options.test_filters) |test_filter| {
80 if (std.mem.find(u8, annotated_case_name, test_filter)) |_| break;81 if (std.mem.find(u8, annotated_case_name, test_filter)) |_| break;
81 } else if (libc.options.test_filters.len > 0) continue;82 } else if (libc.options.test_filters.len > 0) continue;