diff options
Diffstat (limited to 'spec/util')
-rw-r--r-- | spec/util/test_env.lua | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index 51893e83..db5cd203 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -208,7 +208,8 @@ end | |||
208 | function test_env.set_args() | 208 | function test_env.set_args() |
209 | -- if at least Lua/LuaJIT version argument was found on input start to parse other arguments to env. variables | 209 | -- if at least Lua/LuaJIT version argument was found on input start to parse other arguments to env. variables |
210 | test_env.TYPE_TEST_ENV = "minimal" | 210 | test_env.TYPE_TEST_ENV = "minimal" |
211 | test_env.OPENSSL_DIRS = "" | 211 | test_env.OPENSSL_INCDIR = "" |
212 | test_env.OPENSSL_LIBDIR = "" | ||
212 | test_env.RESET_ENV = true | 213 | test_env.RESET_ENV = true |
213 | 214 | ||
214 | for _, argument in ipairs(arg) do | 215 | for _, argument in ipairs(arg) do |
@@ -224,7 +225,6 @@ function test_env.set_args() | |||
224 | test_env.TRAVIS = true | 225 | test_env.TRAVIS = true |
225 | elseif argument == "appveyor" then | 226 | elseif argument == "appveyor" then |
226 | test_env.APPVEYOR = true | 227 | test_env.APPVEYOR = true |
227 | test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include" | ||
228 | elseif argument:find("^os=") then | 228 | elseif argument:find("^os=") then |
229 | test_env.TEST_TARGET_OS = argument:match("^os=(.*)$") | 229 | test_env.TEST_TARGET_OS = argument:match("^os=(.*)$") |
230 | elseif argument == "mingw" then | 230 | elseif argument == "mingw" then |
@@ -245,14 +245,26 @@ function test_env.set_args() | |||
245 | 245 | ||
246 | if package.config:sub(1,1) == "\\" then | 246 | if package.config:sub(1,1) == "\\" then |
247 | test_env.TEST_TARGET_OS = "windows" | 247 | test_env.TEST_TARGET_OS = "windows" |
248 | if test_env.APPVEYOR then | ||
249 | test_env.OPENSSL_INCDIR = "C:\\OpenSSL-Win32\\include" | ||
250 | test_env.OPENSSL_LIBDIR = "C:\\OpenSSL-Win32\\lib" | ||
251 | if test_env.MINGW then | ||
252 | test_env.OPENSSL_LIBDIR = "C:\\OpenSSL-Win32\\bin" | ||
253 | end | ||
254 | end | ||
248 | else | 255 | else |
249 | local system = execute_output("uname -s") | 256 | local system = execute_output("uname -s") |
250 | if system == "Linux" then | 257 | if system == "Linux" then |
251 | test_env.TEST_TARGET_OS = "linux" | 258 | test_env.TEST_TARGET_OS = "linux" |
259 | if test_env.TRAVIS then | ||
260 | test_env.OPENSSL_INCDIR = "/usr/include" | ||
261 | test_env.OPENSSL_LIBDIR = "/usr/lib/x86_64-linux-gnu" | ||
262 | end | ||
252 | elseif system == "Darwin" then | 263 | elseif system == "Darwin" then |
253 | test_env.TEST_TARGET_OS = "osx" | 264 | test_env.TEST_TARGET_OS = "osx" |
254 | if test_env.TRAVIS then | 265 | if test_env.TRAVIS then |
255 | test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=/usr/local/opt/openssl/lib OPENSSL_INCDIR=/usr/local/opt/openssl/include" | 266 | test_env.OPENSSL_INCDIR = "/usr/local/opt/openssl/include" |
267 | test_env.OPENSSL_LIBDIR = "/usr/local/opt/openssl/lib" | ||
256 | end | 268 | end |
257 | end | 269 | end |
258 | end | 270 | end |