Merge pull request #14 from Browsercore/run-test

build: run test suite
This commit is contained in:
Francis Bouvier
2023-09-28 14:31:34 +02:00
committed by GitHub

View File

@@ -64,12 +64,14 @@ pub fn build(b: *std.build.Builder) !void {
// ---- // ----
// compile // compile
const exe_tests = b.addTest(.{ .root_source_file = .{ .path = "src/run_tests.zig" } }); const tests = b.addTest(.{ .root_source_file = .{ .path = "src/run_tests.zig" } });
try common(exe_tests, options); try common(tests, options);
tests.single_threaded = true;
const run_tests = b.addRunArtifact(tests);
// step // step
const test_step = b.step("test", "Run unit tests"); const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&exe_tests.step); test_step.dependOn(&run_tests.step);
} }
fn common( fn common(