diff --git a/lldb/cmake/modules/FindLuaAndSwig.cmake b/lldb/cmake/modules/FindLuaAndSwig.cmake index 33fadb2a09740..c5df29e8d0a92 100644 --- a/lldb/cmake/modules/FindLuaAndSwig.cmake +++ b/lldb/cmake/modules/FindLuaAndSwig.cmake @@ -34,6 +34,7 @@ else() FOUND_VAR LUAANDSWIG_FOUND REQUIRED_VARS + LUA_EXECUTABLE LUA_LIBRARIES LUA_INCLUDE_DIR LUA_VERSION_MINOR diff --git a/lldb/test/API/lua_api/TestLuaAPI.py b/lldb/test/API/lua_api/TestLuaAPI.py index 4ac795d696425..e78ed9de72375 100644 --- a/lldb/test/API/lua_api/TestLuaAPI.py +++ b/lldb/test/API/lua_api/TestLuaAPI.py @@ -158,7 +158,9 @@ 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 not os.path.exists( + os.environ["LUA_EXECUTABLE"] + ): self.skipTest("Lua API tests could not find Lua executable.") return lua_executable = os.environ["LUA_EXECUTABLE"]