Tools: cope with not being in top directory

autotest runs from ../buildlogs
This commit is contained in:
Andrew Tridgell 2023-02-10 14:20:40 +11:00
parent 62b7d0276e
commit 01d72aef17
1 changed files with 4 additions and 2 deletions

View File

@ -95,9 +95,11 @@ def lua_applets():
paths = []
for p in patterns:
debug("Adding lua paths %s" % p)
luafiles = glob.glob(p)
luafiles = glob.glob(os.path.join(apm_path, p))
for f in luafiles:
f = f.replace("libraries/", "")
# the library is expected to have the path as a relative path from within
# a vehicle directory
f = f.replace(apm_path, "../")
paths.append(f)
setattr(lua_lib, "Path", ','.join(paths))
return lua_lib