use provided target for tests

This commit is contained in:
Lee Cannon 2022-05-29 18:19:30 +01:00
parent 4f04f7dac0
commit dcc125e115
No known key found for this signature in database
GPG Key ID: 983D5E5CC5E1401F

View File

@ -36,10 +36,12 @@ pub fn build(b: *std.build.Builder) !void {
var unit_tests = b.addTest("src/unit_tests.zig");
unit_tests.setBuildMode(.Debug);
unit_tests.setTarget(target);
test_step.dependOn(&unit_tests.step);
var session_tests = b.addTest("tests/sessions.zig");
session_tests.addPackage(.{ .name = "header", .source = .{ .path = "src/header.zig" } });
session_tests.setBuildMode(.Debug);
session_tests.setTarget(target);
test_step.dependOn(&session_tests.step);
}