| ... | @@ -36,7 +36,7 @@ pub fn build(b: *Builder) !void { | ... | @@ -36,7 +36,7 @@ pub fn build(b: *Builder) !void { |
| 36 | const docs_step = b.step("docs", "Build documentation"); | 36 | const docs_step = b.step("docs", "Build documentation"); |
| 37 | docs_step.dependOn(&docgen_cmd.step); | 37 | docs_step.dependOn(&docgen_cmd.step); |
| 38 | | 38 | |
| 39 | const test_step = b.step("test", "Run all the tests"); | 39 | const toolchain_step = b.step("test-toolchain", "Run the tests for the toolchain"); |
| 40 | | 40 | |
| 41 | var test_stage2 = b.addTest("src/test.zig"); | 41 | var test_stage2 = b.addTest("src/test.zig"); |
| 42 | test_stage2.setBuildMode(mode); | 42 | test_stage2.setBuildMode(mode); |
| ... | @@ -90,7 +90,7 @@ pub fn build(b: *Builder) !void { | ... | @@ -90,7 +90,7 @@ pub fn build(b: *Builder) !void { |
| 90 | exe.install(); | 90 | exe.install(); |
| 91 | exe.setBuildMode(mode); | 91 | exe.setBuildMode(mode); |
| 92 | exe.setTarget(target); | 92 | exe.setTarget(target); |
| 93 | test_step.dependOn(&exe.step); | 93 | toolchain_step.dependOn(&exe.step); |
| 94 | b.default_step.dependOn(&exe.step); | 94 | b.default_step.dependOn(&exe.step); |
| 95 | | 95 | |
| 96 | exe.addBuildOption(bool, "skip_non_native", skip_non_native); | 96 | exe.addBuildOption(bool, "skip_non_native", skip_non_native); |
| ... | @@ -233,7 +233,7 @@ pub fn build(b: *Builder) !void { | ... | @@ -233,7 +233,7 @@ pub fn build(b: *Builder) !void { |
| 233 | const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests"); | 233 | const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests"); |
| 234 | test_stage2_step.dependOn(&test_stage2.step); | 234 | test_stage2_step.dependOn(&test_stage2.step); |
| 235 | if (!skip_stage2_tests) { | 235 | if (!skip_stage2_tests) { |
| 236 | test_step.dependOn(test_stage2_step); | 236 | toolchain_step.dependOn(test_stage2_step); |
| 237 | } | 237 | } |
| 238 | | 238 | |
| 239 | var chosen_modes: [4]builtin.Mode = undefined; | 239 | var chosen_modes: [4]builtin.Mode = undefined; |
| ... | @@ -257,33 +257,37 @@ pub fn build(b: *Builder) !void { | ... | @@ -257,33 +257,37 @@ pub fn build(b: *Builder) !void { |
| 257 | const modes = chosen_modes[0..chosen_mode_index]; | 257 | const modes = chosen_modes[0..chosen_mode_index]; |
| 258 | | 258 | |
| 259 | // run stage1 `zig fmt` on this build.zig file just to make sure it works | 259 | // run stage1 `zig fmt` on this build.zig file just to make sure it works |
| 260 | test_step.dependOn(&fmt_build_zig.step); | 260 | toolchain_step.dependOn(&fmt_build_zig.step); |
| 261 | const fmt_step = b.step("test-fmt", "Run zig fmt against build.zig to make sure it works"); | 261 | const fmt_step = b.step("test-fmt", "Run zig fmt against build.zig to make sure it works"); |
| 262 | fmt_step.dependOn(&fmt_build_zig.step); | 262 | fmt_step.dependOn(&fmt_build_zig.step); |
| 263 | | 263 | |
| 264 | // TODO for the moment, skip wasm32-wasi until bugs are sorted out. | 264 | // TODO for the moment, skip wasm32-wasi until bugs are sorted out. |
| 265 | test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); | 265 | toolchain_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); |
| 266 | | 266 | |
| 267 | test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/std.zig", "std", "Run the standard library tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); | 267 | toolchain_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); |
| 268 | | 268 | toolchain_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/c.zig", "minilibc", "Run the mini libc tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); |
| 269 | test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); | 269 | |
| 270 | test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/c.zig", "minilibc", "Run the mini libc tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); | 270 | toolchain_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes)); |
| 271 | | 271 | toolchain_step.dependOn(tests.addStandaloneTests(b, test_filter, modes)); |
| 272 | test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes)); | 272 | toolchain_step.dependOn(tests.addStackTraceTests(b, test_filter, modes)); |
| 273 | test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes)); | 273 | toolchain_step.dependOn(tests.addCliTests(b, test_filter, modes)); |
| 274 | test_step.dependOn(tests.addStackTraceTests(b, test_filter, modes)); | 274 | toolchain_step.dependOn(tests.addAssembleAndLinkTests(b, test_filter, modes)); |
| 275 | test_step.dependOn(tests.addCliTests(b, test_filter, modes)); | 275 | toolchain_step.dependOn(tests.addRuntimeSafetyTests(b, test_filter, modes)); |
| 276 | test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filter, modes)); | 276 | toolchain_step.dependOn(tests.addTranslateCTests(b, test_filter)); |
| 277 | test_step.dependOn(tests.addRuntimeSafetyTests(b, test_filter, modes)); | | |
| 278 | test_step.dependOn(tests.addTranslateCTests(b, test_filter)); | | |
| 279 | if (!skip_run_translated_c) { | 277 | if (!skip_run_translated_c) { |
| 280 | test_step.dependOn(tests.addRunTranslatedCTests(b, test_filter, target)); | 278 | toolchain_step.dependOn(tests.addRunTranslatedCTests(b, test_filter, target)); |
| 281 | } | 279 | } |
| 282 | // tests for this feature are disabled until we have the self-hosted compiler available | 280 | // tests for this feature are disabled until we have the self-hosted compiler available |
| 283 | // test_step.dependOn(tests.addGenHTests(b, test_filter)); | 281 | // toolchain_step.dependOn(tests.addGenHTests(b, test_filter)); |
| 284 | if (!skip_compile_errors) { | 282 | if (!skip_compile_errors) { |
| 285 | test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes)); | 283 | toolchain_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes)); |
| 286 | } | 284 | } |
| | 285 | |
| | 286 | const std_step = tests.addPkgTests(b, test_filter, "lib/std/std.zig", "std", "Run the standard library tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir); |
| | 287 | |
| | 288 | const test_step = b.step("test", "Run all the tests"); |
| | 289 | test_step.dependOn(toolchain_step); |
| | 290 | test_step.dependOn(std_step); |
| 287 | test_step.dependOn(docs_step); | 291 | test_step.dependOn(docs_step); |
| 288 | } | 292 | } |
| 289 | | 293 | |