diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-03-08 10:47:41 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-03-08 10:47:41 -0500 |
commit | 27d6bbd3d98bde278cc828d6673a93c4702b3e80 (patch) | |
tree | 4615bb398b05cb81436b0da6298563e34dbd1c5a /indra/newview/llluamanager.cpp | |
parent | 8a3f537cf8967cf28482f321b00a03949773d8f5 (diff) |
Allow build-time Lua tests to require() bundled Lua modules.
Diffstat (limited to 'indra/newview/llluamanager.cpp')
-rw-r--r-- | indra/newview/llluamanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llluamanager.cpp b/indra/newview/llluamanager.cpp index cd663021a1..c65f062fd7 100644 --- a/indra/newview/llluamanager.cpp +++ b/indra/newview/llluamanager.cpp @@ -435,7 +435,14 @@ void LLRequireResolver::findModule() fail(); } - std::vector<std::string> lib_paths {gDirUtilp->getExpandedFilename(LL_PATH_SCRIPTS, "lua")}; + std::vector<std::string> lib_paths + { + gDirUtilp->getExpandedFilename(LL_PATH_SCRIPTS, "lua"), +#ifdef LL_TEST + // Build-time tests don't have the app bundle - use source tree. + std::filesystem::path(__FILE__).parent_path() / "scripts" / "lua", +#endif + }; for (const auto& path : lib_paths) { |