summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 4c12865..c732d2d 100644
--- a/build.zig
+++ b/build.zig
@@ -52,6 +52,10 @@ pub fn build(b: *std.Build) void {
versions_mod.addOption([]const u8, "lua_version", lua_version);
versions_mod.addOption([]const u8, "lua_short_version", lua_short_version);
versions_mod.addOption([]const u8, "luarocks_version", luarocks_version);
+ // Absolute repo root, for tests that need to locate source-tree
+ // assets (e.g. `agent/tools/*.lua`) regardless of the test
+ // runner's cwd.
+ versions_mod.addOption([]const u8, "repo_root", b.build_root.path orelse ".");
// CLI executable
const exe_mod = b.createModule(.{