build: add mode paramater to testStep
functions
This commit is contained in:
parent
26f5a7a490
commit
e0884da649
1 changed files with 4 additions and 2 deletions
|
@ -4,12 +4,14 @@ const Builder = std.build.Builder;
|
|||
const system_sdk = @import("system_sdk.zig");
|
||||
|
||||
pub fn build(b: *Builder) void {
|
||||
const mode = b.standardReleaseOptions();
|
||||
const test_step = b.step("test", "Run library tests");
|
||||
test_step.dependOn(&testStep(b).step);
|
||||
test_step.dependOn(&testStep(b, mode).step);
|
||||
}
|
||||
|
||||
pub fn testStep(b: *Builder) *std.build.LibExeObjStep {
|
||||
pub fn testStep(b: *Builder, mode: std.builtin.Mode) *std.build.LibExeObjStep {
|
||||
const main_tests = b.addTest(thisDir() ++ "/src/main.zig");
|
||||
main_tests.setBuildMode(mode);
|
||||
link(b, main_tests, .{});
|
||||
return main_tests;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue