Skip to content

Commit 08eb8ef

Browse files
committed
[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.
1 parent f801b6f commit 08eb8ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/test/API/lua_api/TestLuaAPI.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ def get_tests(self):
158158
return tests
159159

160160
def test_lua_api(self):
161-
if "LUA_EXECUTABLE" not in os.environ or len(os.environ["LUA_EXECUTABLE"]) == 0:
161+
if (
162+
"LUA_EXECUTABLE" not in os.environ
163+
or len(os.environ["LUA_EXECUTABLE"]) == 0
164+
or "NOTFOUND" in os.environ["LUA_EXECUTABLE"]
165+
):
162166
self.skipTest("Lua API tests could not find Lua executable.")
163167
return
164168
lua_executable = os.environ["LUA_EXECUTABLE"]

0 commit comments

Comments
 (0)