diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-11 14:36:09 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-11 14:36:09 -0200 |
commit | 07d4ff85e189da8b52214a744b1e5af9901dfdea (patch) | |
tree | f32344a76ae0330669e0b1b6e1945bce0f595402 | |
parent | d80124af9cd929b395b4d4c353b51ccc902a3f9e (diff) | |
download | luarocks-07d4ff85e189da8b52214a744b1e5af9901dfdea.tar.gz luarocks-07d4ff85e189da8b52214a744b1e5af9901dfdea.tar.bz2 luarocks-07d4ff85e189da8b52214a744b1e5af9901dfdea.zip |
Tests: modify platform detection
-rw-r--r-- | spec/util/test_env.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index 9d9ae843..c5178e57 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -209,15 +209,18 @@ function test_env.set_args() | |||
209 | if not test_env.TEST_TARGET_OS then | 209 | if not test_env.TEST_TARGET_OS then |
210 | title("OS CHECK") | 210 | title("OS CHECK") |
211 | 211 | ||
212 | if execute_bool("sw_vers") then | 212 | if package.config:sub(1,1) == "\\" then |
213 | test_env.TEST_TARGET_OS = "osx" | ||
214 | if test_env.TRAVIS then | ||
215 | test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=/usr/local/opt/openssl/lib OPENSSL_INCDIR=/usr/local/opt/openssl/include" | ||
216 | end | ||
217 | elseif execute_output("uname -s") == "Linux" then | ||
218 | test_env.TEST_TARGET_OS = "linux" | ||
219 | else | ||
220 | test_env.TEST_TARGET_OS = "windows" | 213 | test_env.TEST_TARGET_OS = "windows" |
214 | else | ||
215 | local system = execute_output("uname -s") | ||
216 | if system == "Linux" then | ||
217 | test_env.TEST_TARGET_OS = "linux" | ||
218 | elseif system == "Darwin" then | ||
219 | test_env.TEST_TARGET_OS = "osx" | ||
220 | if test_env.TRAVIS then | ||
221 | test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=/usr/local/opt/openssl/lib OPENSSL_INCDIR=/usr/local/opt/openssl/include" | ||
222 | end | ||
223 | end | ||
221 | end | 224 | end |
222 | end | 225 | end |
223 | return true | 226 | return true |