diff options
Diffstat (limited to 'build/process.zig')
| -rw-r--r-- | build/process.zig | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/build/process.zig b/build/process.zig index 1968aaab..16f9b48b 100644 --- a/build/process.zig +++ b/build/process.zig @@ -6,6 +6,8 @@ const std = @import("std"); /// window's own, run in full when asked. pub fn add(b: *std.Build, opts: struct { exe: *std.Build.Step.Compile, + /// The language server a tty case's `.rs` files speak to (test/lspmock.zig). + lspmock: *std.Build.Step.Compile, /// The addons the build made (image, pdf), which every session loads: /// each `--addon=<lib>`, linked into its data directory's addons. addons: []const *std.Build.Step.Compile, @@ -23,16 +25,6 @@ pub fn add(b: *std.Build, opts: struct { .link_libc = true, }); ninep_client.addImport("cloud9", opts.cloud9); - // The language server a tty case's `.rs` files speak to. - const lspmock = b.addExecutable(.{ - .name = "pardes-lspmock", - .root_module = b.createModule(.{ - .target = opts.target, - .optimize = opts.optimize, - .root_source_file = b.path("test/lspmock.zig"), - .link_libc = true, - }), - }); const process_test = b.addExecutable(.{ .name = "pardes-process-test", .root_module = b.createModule(.{ @@ -52,7 +44,7 @@ pub fn add(b: *std.Build, opts: struct { const run_process_test = b.addRunArtifact(process_test); run_process_test.addArtifactArg(opts.exe); for (opts.addons) |a| run_process_test.addPrefixedFileArg("--addon=", a.getEmittedBin()); - run_process_test.addPrefixedFileArg("--lspmock=", lspmock.getEmittedBin()); + run_process_test.addPrefixedFileArg("--lspmock=", opts.lspmock.getEmittedBin()); run_process_test.addArg(if (opts.gui) "--backend=gui" else "--backend=tui"); run_process_test.addPassthruArgs(); // The tty cases' goldens are test/snapshots/'s, from the build root. |
