Fixed tests for TravisCI
This commit is contained in:
parent
bf6211df6c
commit
e5aefbd1d4
3 changed files with 13 additions and 9 deletions
|
|
@ -7,6 +7,7 @@ addons:
|
|||
packages:
|
||||
- libcurl4-openssl-dev
|
||||
- libsdl1.2-dev
|
||||
- libgc-dev
|
||||
before_script:
|
||||
- set -e
|
||||
- wget http://flatassembler.net/fasm-1.71.39.tgz
|
||||
|
|
@ -26,5 +27,6 @@ script:
|
|||
- nimble install zip
|
||||
- nimble install opengl
|
||||
- nimble install sdl1
|
||||
- nimble install jester
|
||||
- nim c --taintMode:on tests/testament/tester
|
||||
- tests/testament/tester --pedantic all
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import nake
|
||||
import httpclient, zip/zipfiles, times, math
|
||||
import httpclient, zip/zipfiles, times, math, sequtils
|
||||
nakeImports
|
||||
|
||||
randomize()
|
||||
|
|
|
|||
|
|
@ -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) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue