diff options
author | def <dennis@felsin9.de> | 2015-03-10 15:35:36 +0100 |
---|---|---|
committer | def <dennis@felsin9.de> | 2015-03-10 15:35:36 +0100 |
commit | ac0f62084c6869ae1a7905638d60009bb9efd8c8 (patch) | |
tree | 4ba7b1c5b4161d469d84ad02b968bbafc645a3b6 | |
parent | 69e2b61c0a990452045d2157c095edfe9225a59b (diff) | |
download | Nim-ac0f62084c6869ae1a7905638d60009bb9efd8c8.tar.gz |
Fix DLL tests on POSIX
Automatically add the lib directory to LD_LIBRARY_PATH temporarily
-rw-r--r-- | tests/testament/categories.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index 323abd768..c293be7e8 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -86,9 +86,9 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) = safeCopyFile("lib" / nimrtlDll, "tests/dll" / nimrtlDll) else: # posix relies on crappy LD_LIBRARY_PATH (ugh!): - var libpath = getenv"LD_LIBRARY_PATH".string - if peg"\i '/nim' (!'/')* '/lib'" notin libpath: - echo "[Warning] insufficient LD_LIBRARY_PATH" + var libpath = getEnv"LD_LIBRARY_PATH".string + # Temporarily add the lib directory to LD_LIBRARY_PATH: + putEnv("LD_LIBRARY_PATH", "lib:" & libpath) var serverDll = DynlibFormat % "server" safeCopyFile("tests/dll" / serverDll, "lib" / serverDll) |