From e5aefbd1d4b865507efb755f2d89e09e0aab2bdc Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Thu, 22 Oct 2015 17:39:39 +0300 Subject: Fixed tests for TravisCI --- tests/manyloc/nake/nakefile.nim | 2 +- tests/testament/categories.nim | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'tests') 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) = -- cgit 1.4.1-2-gfad0 4f3a4631261e109d6b8c4d'>tests/async/tasynctry.nim
blob: f77198e2e7fc09e6b114a7a5d6b67388a444006f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104