2017-04-19 06:13:15 +01:00
|
|
|
const Builder = @import("std").build.Builder;
|
|
|
|
const tests = @import("test/tests.zig");
|
|
|
|
|
|
|
|
pub fn build(b: &Builder) {
|
|
|
|
const test_filter = b.option([]const u8, "test-filter", "Skip tests that do not match filter");
|
|
|
|
const test_step = b.step("test", "Run all the tests");
|
|
|
|
|
2017-04-20 07:26:36 +01:00
|
|
|
const cleanup = b.addRemoveDirTree("test_artifacts");
|
|
|
|
test_step.dependOn(&cleanup.step);
|
2017-04-19 06:13:15 +01:00
|
|
|
|
2017-04-20 07:26:36 +01:00
|
|
|
cleanup.step.dependOn(tests.addPkgTests(b, test_filter,
|
|
|
|
"test/behavior.zig", "behavior", "Run the behavior tests"));
|
2017-04-19 09:12:22 +01:00
|
|
|
|
2017-04-20 07:26:36 +01:00
|
|
|
cleanup.step.dependOn(tests.addPkgTests(b, test_filter,
|
|
|
|
"std/index.zig", "std", "Run the standard library tests"));
|
|
|
|
|
|
|
|
cleanup.step.dependOn(tests.addCompareOutputTests(b, test_filter));
|
|
|
|
cleanup.step.dependOn(tests.addBuildExampleTests(b, test_filter));
|
|
|
|
cleanup.step.dependOn(tests.addCompileErrorTests(b, test_filter));
|
|
|
|
cleanup.step.dependOn(tests.addAssembleAndLinkTests(b, test_filter));
|
|
|
|
cleanup.step.dependOn(tests.addDebugSafetyTests(b, test_filter));
|
|
|
|
cleanup.step.dependOn(tests.addParseHTests(b, test_filter));
|
2017-04-19 06:13:15 +01:00
|
|
|
}
|