Skip to content

Commit ec5f775

Browse files
committed
std.Build.CompileStep: remove setNamePrefix and add setName
1 parent 3b97558 commit ec5f775

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

lib/std/Build/CompileStep.zig

+2-9
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ c_std: std.Build.CStd,
8383
zig_lib_dir: ?[]const u8,
8484
main_pkg_path: ?[]const u8,
8585
exec_cmd_args: ?[]const ?[]const u8,
86-
name_prefix: []const u8,
8786
filter: ?[]const u8,
8887
test_evented_io: bool = false,
8988
test_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

850-
pub fn setNamePrefix(self: *CompileStep, text: []const u8) void {
848+
pub 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

856854
pub 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
Original file line numberDiff line numberDiff line change
@@ -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();

0 commit comments

Comments
 (0)