Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 0b5534d

Browse files
committed
[[ Tests ]] Ensure binaries path is correct on mac server
1 parent 2fe9c10 commit 0b5534d

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

tests/_testlib.livecodescript

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,33 @@ on TestLoadExtension pName
351351

352352
end TestLoadExtension
353353

354+
function TestGetBinariesPath
355+
local tEngineFolder
356+
put specialfolderpath("engine") into tEngineFolder
357+
358+
set the itemdelimiter to slash
359+
if the platform is "MacOS" and the environment is not "server" then
360+
return item 1 to -4 of tEngineFolder
361+
end if
362+
363+
return tEngineFolder
364+
end TestGetBinariesPath
365+
354366
on TestLoadExternal pExternal
355367
local tEnginePath
356368
put specialfolderpath("engine") into tEnginePath
357369

358-
local tExternalsPath, tExtension
370+
local tBinariesPath, tExtension
359371
set the itemdelimiter to slash
360372
if the platform is "MacOS" then
361-
put item 1 to -4 of tEnginePath into tExternalsPath
362373
put "bundle" into tExtension
363374
else if the platform is "linux" then
364-
put tEnginePath into tExternalsPath
365375
put "so" into tExtension
366376
end if
367377

368-
set the externals of the templateStack to tExternalsPath & slash & \
378+
put TestGetBinariesPath() into tBinariesPath
379+
380+
set the externals of the templateStack to tBinariesPath & slash & \
369381
pExternal & "." & tExtension
370382

371383
create stack pExternal && "External"
@@ -377,7 +389,7 @@ on TestLoadExternal pExternal
377389

378390
-- Ensure drivers can be found
379391
if pExternal is "revdb" then
380-
revSetDatabaseDriverPath tExternalsPath
392+
revSetDatabaseDriverPath tBinariesPath
381393
end if
382394
end TestLoadExternal
383395

0 commit comments

Comments
 (0)