Allow setting test filter in zig build test
(#909)
Example usage: $ zig build test -Dtest-filter=definition
This commit is contained in:
parent
93abb8cdd5
commit
6949989ece
@ -163,6 +163,11 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
test_step.dependOn(b.getInstallStep());
|
test_step.dependOn(b.getInstallStep());
|
||||||
|
|
||||||
var tests = b.addTest("tests/tests.zig");
|
var tests = b.addTest("tests/tests.zig");
|
||||||
|
tests.setFilter(b.option(
|
||||||
|
[]const u8,
|
||||||
|
"test-filter",
|
||||||
|
"Skip tests that do not match filter",
|
||||||
|
));
|
||||||
|
|
||||||
if (coverage) {
|
if (coverage) {
|
||||||
const src_dir = b.pathJoin(&.{ b.build_root, "src" });
|
const src_dir = b.pathJoin(&.{ b.build_root, "src" });
|
||||||
|
Loading…
Reference in New Issue
Block a user