[Lldb-commits] [lldb] [lldb][test] skip Lua tests when the Lua interpreter is not found (PR #164793)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 23 03:20:26 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Vincent Palatin (vpalatin)
<details>
<summary>Changes</summary>
When Swig is installed but not any Lua interpreter, the cmake script in `lldb/cmake/modules/FindLuaAndSwig.cmake` will execute `find_program(LUA_EXECUTABLE, ...)` and this will set the `LUA_EXECUTABLE` variable to `LUA_EXECUTABLE-NOTFOUND`.
Ensure that in this case we are skipping the Lua tests requiring the interpreter.
---
Full diff: https://github.com/llvm/llvm-project/pull/164793.diff
1 Files Affected:
- (modified) lldb/test/API/lua_api/TestLuaAPI.py (+5-1)
``````````diff
diff --git a/lldb/test/API/lua_api/TestLuaAPI.py b/lldb/test/API/lua_api/TestLuaAPI.py
index 4ac795d696425..41d7873575a3d 100644
--- a/lldb/test/API/lua_api/TestLuaAPI.py
+++ b/lldb/test/API/lua_api/TestLuaAPI.py
@@ -158,7 +158,11 @@ def get_tests(self):
return tests
def test_lua_api(self):
- if "LUA_EXECUTABLE" not in os.environ or len(os.environ["LUA_EXECUTABLE"]) == 0:
+ if (
+ "LUA_EXECUTABLE" not in os.environ
+ or len(os.environ["LUA_EXECUTABLE"]) == 0
+ or "NOTFOUND" in os.environ["LUA_EXECUTABLE"]
+ ):
self.skipTest("Lua API tests could not find Lua executable.")
return
lua_executable = os.environ["LUA_EXECUTABLE"]
``````````
</details>
https://github.com/llvm/llvm-project/pull/164793
More information about the lldb-commits
mailing list