File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -50,20 +50,19 @@ pub fn build(b: *std.Build) void {
5050
5151 b .installArtifact (example_zig );
5252
53- var main_tests = b .addTest (.{
53+ const test_step = b .step ("test" , "Run library tests" );
54+ const main_tests = b .addTest (.{
5455 .root_source_file = b .path ("src/test.zig" ),
5556 .optimize = optimize ,
5657 });
58+ test_step .dependOn (& b .addRunArtifact (main_tests ).step );
5759
58- var binding_tests = b .addTest (.{
60+ const binding_tests = b .addTest (.{
5961 .root_source_file = b .path ("src/lib-test.zig" ),
6062 .optimize = optimize ,
6163 });
6264 binding_tests .addIncludePath (b .path ("src" ));
6365 binding_tests .linkLibrary (lib );
6466 binding_tests .linkLibC ();
65-
66- const test_step = b .step ("test" , "Run library tests" );
67- test_step .dependOn (& main_tests .step );
68- test_step .dependOn (& binding_tests .step );
67+ test_step .dependOn (& b .addRunArtifact (binding_tests ).step );
6968}
You can’t perform that action at this time.
0 commit comments