From 7f5c49e2047696d0d89ad18430456c62563509d8 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Tue, 6 Oct 2015 15:54:12 -0700 Subject: [PATCH] copy nimrtl into lib, reset LD_LIBRARY_PATH after use --- tests/testament/categories.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index afc4a616f..9de33acb1 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -89,8 +89,11 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) = var libpath = getEnv"LD_LIBRARY_PATH".string # Temporarily add the lib directory to LD_LIBRARY_PATH: putEnv("LD_LIBRARY_PATH", "lib:" & libpath) + defer: putEnv("LD_LIBRARY_PATH", libpath) var serverDll = DynlibFormat % "server" safeCopyFile("tests/dll" / serverDll, "lib" / serverDll) + var nimrtlDll = DynlibFormat % "nimrtl" + safeCopyFile("tests/dll" / nimrtlDll, "lib" / nimrtlDll) testSpec r, makeTest("tests/dll/client.nim", options & " -d:useNimRtl", cat, actionRun)