summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/build.zig b/build.zig
index 8033831..8b8ae3e 100644
--- a/build.zig
+++ b/build.zig
@@ -245,7 +245,7 @@ const all_test_targets = switch (builtin.target.cpu.arch) {
245 }, 245 },
246}; 246};
247 247
248fn computeTestTargets(target: std.zig.CrossTarget, ci: ?bool, use_bundled: ?bool) []const TestTarget { 248fn computeTestTargets(target: std.zig.CrossTarget, ci: ?bool) ?[]const TestTarget {
249 if (ci != null and ci.?) return &ci_targets; 249 if (ci != null and ci.?) return &ci_targets;
250 250
251 if (target.isNative()) { 251 if (target.isNative()) {
@@ -254,10 +254,7 @@ fn computeTestTargets(target: std.zig.CrossTarget, ci: ?bool, use_bundled: ?bool
254 } 254 }
255 255
256 // Otherwise we run a single test target. 256 // Otherwise we run a single test target.
257 return &[_]TestTarget{.{ 257 return null;
258 .target = target,
259 .bundled = use_bundled orelse false,
260 }};
261} 258}
262 259
263pub fn build(b: *std.Build) !void { 260pub fn build(b: *std.Build) !void {
@@ -305,7 +302,10 @@ pub fn build(b: *std.Build) !void {
305 const preprocess_files_tool_run = b.addRunArtifact(preprocess_files_tool); 302 const preprocess_files_tool_run = b.addRunArtifact(preprocess_files_tool);
306 preprocess_files_run.dependOn(&preprocess_files_tool_run.step); 303 preprocess_files_run.dependOn(&preprocess_files_tool_run.step);
307 304
308 const test_targets = computeTestTargets(target, ci, use_bundled); 305 const test_targets = computeTestTargets(target, ci) orelse &[_]TestTarget{.{
306 .target = target,
307 .bundled = use_bundled orelse false,
308 }};
309 const test_step = b.step("test", "Run library tests"); 309 const test_step = b.step("test", "Run library tests");
310 310
311 // By default the tests will only be execute for native test targets, however they will be compiled 311 // By default the tests will only be execute for native test targets, however they will be compiled