mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
convert std lib tests to zig build system
This commit is contained in:
parent
10525b869d
commit
d0a17b6937
18
build.zig
18
build.zig
@ -11,6 +11,7 @@ pub fn build(b: &Builder) {
|
||||
run_tests_cmd.step.dependOn(&run_tests_exe.step);
|
||||
|
||||
const self_hosted_tests = b.step("test-self-hosted", "Run the self-hosted tests");
|
||||
test_step.dependOn(self_hosted_tests);
|
||||
for ([]bool{false, true}) |release| {
|
||||
for ([]bool{false, true}) |link_libc| {
|
||||
const these_tests = b.addTest("test/self_hosted.zig");
|
||||
@ -24,9 +25,24 @@ pub fn build(b: &Builder) {
|
||||
}
|
||||
}
|
||||
|
||||
test_step.dependOn(self_hosted_tests);
|
||||
const std_lib_tests = b.step("test-std", "Run the standard library tests");
|
||||
test_step.dependOn(std_lib_tests);
|
||||
for ([]bool{false, true}) |release| {
|
||||
for ([]bool{false, true}) |link_libc| {
|
||||
const these_tests = b.addTest("std/index.zig");
|
||||
// TODO add prefix to test names
|
||||
// TODO pass test_filter to these_tests
|
||||
these_tests.setRelease(release);
|
||||
if (link_libc) {
|
||||
these_tests.linkLibrary("c");
|
||||
}
|
||||
std_lib_tests.dependOn(&these_tests.step);
|
||||
}
|
||||
}
|
||||
|
||||
//test_step.dependOn(&run_tests_cmd.step);
|
||||
|
||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filter));
|
||||
test_step.dependOn(tests.addBuildExampleTests(b, test_filter));
|
||||
test_step.dependOn(tests.addCompileErrorTests(b, test_filter));
|
||||
}
|
||||
|
||||
1812
test/compile_errors.zig
Normal file
1812
test/compile_errors.zig
Normal file
File diff suppressed because it is too large
Load Diff
1814
test/run_tests.cpp
1814
test/run_tests.cpp
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,3 @@
|
||||
pub const addCompareOutputTests = @import("compare_output.zig").addCompareOutputTests;
|
||||
pub const addBuildExampleTests = @import("build_examples.zig").addBuildExampleTests;
|
||||
pub const addCompileErrorTests = @import("compile_errors.zig").addCompileErrorTests;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user