diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:51:04 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 09:54:56 -0300 |
| commit | c538b2a4db9a7f7d35d7718629caef253fa63ad8 (patch) | |
| tree | afa8ce40dc98fd9e163cfba4b12db24eed0987ae /build.zig | |
| parent | 370b428a871b8b9e2d860a242eff8a18da4f5574 (diff) | |
| download | pardes-c538b2a4db9a7f7d35d7718629caef253fa63ad8.tar.gz pardes-c538b2a4db9a7f7d35d7718629caef253fa63ad8.zip | |
build: the perf and fs bench programs' tests, which compile no editor, run with unit-test, and their perf-test and fs-bench-test steps go; lspbench-test and hxdiff-test go, with lspbench's three tests, which only that step ran, and hxdiff's --self-test (hxdiff's own four tests stay: test/panes.zig runs them in pane-test)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 28 |
1 files changed, 6 insertions, 22 deletions
@@ -1583,9 +1583,6 @@ pub fn build(b: *std.Build) void { if (test_nonce) |nonce| perf_tests.root_module.addImport("test_rebuild_nonce", nonce); const run_perf_test = b.addRunArtifact(perf_tests); run_perf_test.has_side_effects = true; - const perf_test_step = b.step("perf-test", "test performance options and baselines without compiling the editor"); - perf_test_step.dependOn(&run_perf_test.step); - if (testMatch(b, unit_profile, test_filters, perf_test_step)) |check| check.addArtifactArg(perf_tests); const fs_bench = b.addExecutable(.{ .name = "pardes-fs-bench", @@ -1613,9 +1610,6 @@ pub fn build(b: *std.Build) void { }); const run_fs_bench_test = b.addRunArtifact(fs_bench_test); run_fs_bench_test.has_side_effects = true; - const fs_bench_test_step = b.step("fs-bench-test", "test filesystem benchmark options without compiling the editor"); - fs_bench_test_step.dependOn(&run_fs_bench_test.step); - if (testMatch(b, unit_profile, test_filters, fs_bench_test_step)) |check| check.addArtifactArg(fs_bench_test); const syntax_module = b.createModule(.{ .target = target, @@ -1687,22 +1681,12 @@ pub fn build(b: *std.Build) void { // contrast search per grapheme costs 100x, far past the gate). unit_step.dependOn(perf_gate_step); const unit_match = testMatch(b, unit_profile, test_filters, unit_step); - const lspbench_tests = b.addTest(.{ .root_module = lspbench.root_module, .filters = test_filters }); - const run_lspbench_tests = b.addRunArtifact(lspbench_tests); - run_lspbench_tests.has_side_effects = true; - const lspbench_test_step = b.step("lspbench-test", "test language benchmark completeness and correctness gates"); - lspbench_test_step.dependOn(&run_lspbench_tests.step); - if (testMatch(b, unit_profile, test_filters, lspbench_test_step)) |check| check.addArtifactArg(lspbench_tests); - const diff_tests = b.addTest(.{ .root_module = hxdiff.root_module, .filters = test_filters }); - const run_diff_tests = b.addRunArtifact(diff_tests); - run_diff_tests.has_side_effects = true; - const diff_test_step = b.step("hxdiff-test", "test differential comparison, allocation failures and CLI regression gates"); - diff_test_step.dependOn(&run_diff_tests.step); - if (testMatch(b, unit_profile, test_filters, diff_test_step)) |check| check.addArtifactArg(diff_tests); - const run_diff_cli = b.addRunArtifact(hxdiff); - run_diff_cli.addArg("--self-test"); - run_diff_cli.has_side_effects = true; - diff_test_step.dependOn(&run_diff_cli.step); + // The perf and fs bench programs' own tests: they compile no editor. + for ([_]*std.Build.Step.Compile{ perf_tests, fs_bench_test }, [_]*std.Build.Step.Run{ run_perf_test, run_fs_bench_test }) |t, run| { + test_build.dependOn(&t.step); + unit_step.dependOn(&run.step); + if (unit_match) |check| check.addArtifactArg(t); + } const core_test = b.addTest(.{ .root_module = core_module, .filters = test_filters }); const run_core_test = b.addRunArtifact(core_test); run_core_test.has_side_effects = true; |
