authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-13 23:42:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 10:48:15-07:00
log3e328c89b7016cb688c88ddb11a8949851500928
treef1a50ec0e0148d38371932d33e109ca80fcd1d78
parent941cae4331ff4922ccef08a5d3d5879a0d1fa786

std.Build.CompileStep: remove setNamePrefix and add setName


2 files changed, 4 insertions(+), 13 deletions(-)

lib/std/Build/CompileStep.zig+2-9
......@@ -83,7 +83,6 @@ c_std: std.Build.CStd,
8383zig_lib_dir: ?[]const u8,
8484main_pkg_path: ?[]const u8,
8585exec_cmd_args: ?[]const ?[]const u8,
86name_prefix: []const u8,
8786filter: ?[]const u8,
8887test_evented_io: bool = false,
8988test_runner: ?[]const u8,
......@@ -374,7 +373,6 @@ pub fn create(owner: *std.Build, options: Options) *CompileStep {
374373 .zig_lib_dir = null,
375374 .main_pkg_path = null,
376375 .exec_cmd_args = null,
377 .name_prefix = "",
378376 .filter = null,
379377 .test_runner = null,
380378 .disable_stack_probing = false,
......@@ -847,10 +845,10 @@ fn linkSystemLibraryInner(self: *CompileStep, name: []const u8, opts: struct {
847845 }) catch @panic("OOM");
848846}
849847
850pub fn setNamePrefix(self: *CompileStep, text: []const u8) void {
848pub fn setName(self: *CompileStep, text: []const u8) void {
851849 const b = self.step.owner;
852850 assert(self.kind == .@"test");
853 self.name_prefix = b.dupe(text);
851 self.name = b.dupe(text);
854852}
855853
856854pub fn setFilter(self: *CompileStep, text: ?[]const u8) void {
......@@ -1424,11 +1422,6 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
14241422 try zig_args.append("--test-evented-io");
14251423 }
14261424
1427 if (self.name_prefix.len != 0) {
1428 try zig_args.append("--test-name-prefix");
1429 try zig_args.append(self.name_prefix);
1430 }
1431
14321425 if (self.test_runner) |test_runner| {
14331426 try zig_args.append("--test-runner");
14341427 try zig_args.append(b.pathFromRoot(test_runner));
test/tests.zig+2-4
......@@ -1054,10 +1054,8 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S
10541054 }
10551055
10561056 const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM");
1057 test_step.setNamePrefix(b.fmt("{s}-{s}-{s} ", .{
1058 "test-c-abi",
1059 triple_prefix,
1060 @tagName(optimize_mode),
1057 test_step.setName(b.fmt("test-c-abi-{s}-{s} ", .{
1058 triple_prefix, @tagName(optimize_mode),
10611059 }));
10621060
10631061 const run = test_step.run();