| ... | ... | @@ -59,6 +59,7 @@ pub fn build(b: *Builder) !void { |
| 59 | 59 | |
| 60 | 60 | b.default_step.dependOn(&exe.step); |
| 61 | 61 | |
| 62 | const skip_release = b.option(bool, "skip-release", "Main test suite skips release builds") orelse false; |
| 62 | 63 | const skip_self_hosted = b.option(bool, "skip-self-hosted", "Main test suite skips building self hosted compiler") orelse false; |
| 63 | 64 | if (!skip_self_hosted) { |
| 64 | 65 | test_step.dependOn(&exe.step); |
| ... | ... | @@ -71,19 +72,24 @@ pub fn build(b: *Builder) !void { |
| 71 | 72 | installCHeaders(b, ctx.c_header_files); |
| 72 | 73 | |
| 73 | 74 | const test_filter = b.option([]const u8, "test-filter", "Skip tests that do not match filter"); |
| 74 | | const with_lldb = b.option(bool, "with-lldb", "Run tests in LLDB to get a backtrace if one fails") orelse false; |
| 75 | 75 | |
| 76 | 76 | const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests"); |
| 77 | 77 | test_stage2_step.dependOn(&test_stage2.step); |
| 78 | 78 | test_step.dependOn(test_stage2_step); |
| 79 | 79 | |
| 80 | | test_step.dependOn(docs_step); |
| 80 | const all_modes = []builtin.Mode{ |
| 81 | builtin.Mode.Debug, |
| 82 | builtin.Mode.ReleaseSafe, |
| 83 | builtin.Mode.ReleaseFast, |
| 84 | builtin.Mode.ReleaseSmall, |
| 85 | }; |
| 86 | const modes = if (skip_release) []builtin.Mode{builtin.Mode.Debug} else all_modes; |
| 81 | 87 | |
| 82 | | test_step.dependOn(tests.addPkgTests(b, test_filter, "test/behavior.zig", "behavior", "Run the behavior tests", with_lldb)); |
| 88 | test_step.dependOn(tests.addPkgTests(b, test_filter, "test/behavior.zig", "behavior", "Run the behavior tests", modes)); |
| 83 | 89 | |
| 84 | | test_step.dependOn(tests.addPkgTests(b, test_filter, "std/index.zig", "std", "Run the standard library tests", with_lldb)); |
| 90 | test_step.dependOn(tests.addPkgTests(b, test_filter, "std/index.zig", "std", "Run the standard library tests", modes)); |
| 85 | 91 | |
| 86 | | test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt/index.zig", "compiler-rt", "Run the compiler_rt tests", with_lldb)); |
| 92 | test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt/index.zig", "compiler-rt", "Run the compiler_rt tests", modes)); |
| 87 | 93 | |
| 88 | 94 | test_step.dependOn(tests.addCompareOutputTests(b, test_filter)); |
| 89 | 95 | test_step.dependOn(tests.addBuildExampleTests(b, test_filter)); |
| ... | ... | @@ -92,6 +98,7 @@ pub fn build(b: *Builder) !void { |
| 92 | 98 | test_step.dependOn(tests.addRuntimeSafetyTests(b, test_filter)); |
| 93 | 99 | test_step.dependOn(tests.addTranslateCTests(b, test_filter)); |
| 94 | 100 | test_step.dependOn(tests.addGenHTests(b, test_filter)); |
| 101 | test_step.dependOn(docs_step); |
| 95 | 102 | } |
| 96 | 103 | |
| 97 | 104 | fn dependOnLib(lib_exe_obj: var, dep: *const LibraryDep) void { |