diff options
author | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2015-10-22 17:39:39 +0300 |
---|---|---|
committer | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2015-10-22 21:34:37 +0300 |
commit | e5aefbd1d4b865507efb755f2d89e09e0aab2bdc (patch) | |
tree | 63af85f2d638de97ad812749a1fc111f7f24bb62 /tests | |
parent | bf6211df6c0717109a235122d182d9fc101879ca (diff) | |
download | Nim-e5aefbd1d4b865507efb755f2d89e09e0aab2bdc.tar.gz |
Fixed tests for TravisCI
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manyloc/nake/nakefile.nim | 2 | ||||
-rw-r--r-- | tests/testament/categories.nim | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/tests/manyloc/nake/nakefile.nim b/tests/manyloc/nake/nakefile.nim index 2fe07ec17..de6a1af40 100644 --- a/tests/manyloc/nake/nakefile.nim +++ b/tests/manyloc/nake/nakefile.nim @@ -1,5 +1,5 @@ import nake -import httpclient, zip/zipfiles, times, math +import httpclient, zip/zipfiles, times, math, sequtils nakeImports randomize() diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index e700ff185..526ca4d45 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -75,29 +75,31 @@ proc safeCopyFile(src, dest: string) = echo "[Warning] could not copy: ", src, " to ", dest proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) = + const rpath = when defined(macosx): + " --passL:-rpath --passL:@loader_path" + else: + "" + testSpec c, makeTest("lib/nimrtl.nim", options & " --app:lib -d:createNimRtl", cat) testSpec c, makeTest("tests/dll/server.nim", - options & " --app:lib -d:useNimRtl", cat) + options & " --app:lib -d:useNimRtl" & rpath, cat) + when defined(Windows): # windows looks in the dir of the exe (yay!): - var serverDll = DynlibFormat % "server" - safeCopyFile("lib" / serverDll, "tests/dll" / serverDll) var nimrtlDll = DynlibFormat % "nimrtl" safeCopyFile("lib" / nimrtlDll, "tests/dll" / nimrtlDll) else: # posix relies on crappy LD_LIBRARY_PATH (ugh!): var libpath = getEnv"LD_LIBRARY_PATH".string # Temporarily add the lib directory to LD_LIBRARY_PATH: - putEnv("LD_LIBRARY_PATH", "lib:" & libpath) + putEnv("LD_LIBRARY_PATH", "tests/dll:" & 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) + safeCopyFile("lib" / nimrtlDll, "tests/dll" / nimrtlDll) - testSpec r, makeTest("tests/dll/client.nim", options & " -d:useNimRtl", + testSpec r, makeTest("tests/dll/client.nim", options & " -d:useNimRtl" & rpath, cat, actionRun) proc dllTests(r: var TResults, cat: Category, options: string) = |