1const std = @import("std");
2const deps = @import("./deps.zig");
3
4pub fn build(b: *std.Build) void {
5 const target = b.standardTargetOptions(.{});
6 const mode = b.option(std.builtin.OptimizeMode, "mode", "") orelse .Debug;
7
8 const tests = b.addTest(.{
9 .root_module = b.createModule(.{
10 .root_source_file = b.path("test.zig"),
11 .target = target,
12 .optimize = mode,
13 }),
14 });
15 deps.addAllTo(tests);
16
17 const test_step = b.step("test", "Run all library tests");
18 const tests_run = b.addRunArtifact(tests);
19 tests_run.setCwd(b.path("."));
20 tests_run.has_side_effects = true;
21 test_step.dependOn(&tests_run.step);
22}