[Lldb-commits] [lldb] [lldb][test] skip Lua tests when the Lua interpreter is not found (PR #164793)
Vincent Palatin via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 23 03:19:19 PDT 2025
https://github.com/vpalatin created https://github.com/llvm/llvm-project/pull/164793
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.
>From 08eb8eff3bbb1a83b8d547840563ed008857f077 Mon Sep 17 00:00:00 2001
From: Vincent Palatin <vpalatin at rivosinc.com>
Date: Thu, 23 Oct 2025 12:02:19 +0200
Subject: [PATCH] [lldb][test] skip Lua tests when the Lua interpreter is not
found
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.
---
lldb/test/API/lua_api/TestLuaAPI.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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"]
More information about the lldb-commits
mailing list