aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/standalone/issue_13970/build.zig6
-rw-r--r--test/standalone/test_runner_module_imports/build.zig2
-rw-r--r--test/tests.zig12
3 files changed, 10 insertions, 10 deletions
diff --git a/test/standalone/issue_13970/build.zig b/test/standalone/issue_13970/build.zig
index 7d2799e29e..cc70144596 100644
--- a/test/standalone/issue_13970/build.zig
+++ b/test/standalone/issue_13970/build.zig
@@ -6,16 +6,16 @@ pub fn build(b: *std.Build) void {
const test1 = b.addTest(.{
.root_source_file = .{ .path = "test_root/empty.zig" },
+ .test_runner = "src/main.zig",
});
const test2 = b.addTest(.{
.root_source_file = .{ .path = "src/empty.zig" },
+ .test_runner = "src/main.zig",
});
const test3 = b.addTest(.{
.root_source_file = .{ .path = "empty.zig" },
+ .test_runner = "src/main.zig",
});
- test1.setTestRunner("src/main.zig");
- test2.setTestRunner("src/main.zig");
- test3.setTestRunner("src/main.zig");
test_step.dependOn(&b.addRunArtifact(test1).step);
test_step.dependOn(&b.addRunArtifact(test2).step);
diff --git a/test/standalone/test_runner_module_imports/build.zig b/test/standalone/test_runner_module_imports/build.zig
index 307957faee..f277718898 100644
--- a/test/standalone/test_runner_module_imports/build.zig
+++ b/test/standalone/test_runner_module_imports/build.zig
@@ -3,8 +3,8 @@ const std = @import("std");
pub fn build(b: *std.Build) void {
const t = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
+ .test_runner = "test_runner/main.zig",
});
- t.setTestRunner("test_runner/main.zig");
const module1 = b.createModule(.{ .source_file = .{ .path = "module1/main.zig" } });
const module2 = b.createModule(.{
diff --git a/test/tests.zig b/test/tests.zig
index a9bed635e2..18af132992 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -977,11 +977,11 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
.optimize = test_target.optimize_mode,
.target = test_target.target,
.max_rss = max_rss,
+ .filter = options.test_filter,
});
const single_threaded_txt = if (test_target.single_threaded) "single" else "multi";
const backend_txt = if (test_target.backend) |backend| @tagName(backend) else "default";
these_tests.single_threaded = test_target.single_threaded;
- these_tests.setFilter(options.test_filter);
if (test_target.link_libc) {
these_tests.linkSystemLibrary("c");
}
@@ -1037,10 +1037,15 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S
continue;
}
+ const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM");
+
const test_step = b.addTest(.{
.root_source_file = .{ .path = "test/c_abi/main.zig" },
.optimize = optimize_mode,
.target = c_abi_target,
+ .name = b.fmt("test-c-abi-{s}-{s}", .{
+ triple_prefix, @tagName(optimize_mode),
+ }),
});
if (c_abi_target.abi != null and c_abi_target.abi.?.isMusl()) {
// TODO NativeTargetInfo insists on dynamically linking musl
@@ -1057,11 +1062,6 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S
test_step.want_lto = false;
}
- const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM");
- test_step.setName(b.fmt("test-c-abi-{s}-{s} ", .{
- triple_prefix, @tagName(optimize_mode),
- }));
-
const run = b.addRunArtifact(test_step);
run.skip_foreign_checks = true;
step.dependOn(&run.step);