diff options
author | Hisham <hisham@gobolinux.org> | 2016-08-22 16:01:43 -0300 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-08-22 16:01:43 -0300 |
commit | 523af94efbedba37bf62279b88e1334fb64c4924 (patch) | |
tree | 60d935e336bd3cc361ee2afa36c3f6622fb0a83d /test | |
parent | 84d19752fae29d3b1593b92cb4244478ee9a8b75 (diff) | |
download | luarocks-523af94efbedba37bf62279b88e1334fb64c4924.tar.gz luarocks-523af94efbedba37bf62279b88e1334fb64c4924.tar.bz2 luarocks-523af94efbedba37bf62279b88e1334fb64c4924.zip |
Add support for testing using MinGW
Diffstat (limited to 'test')
-rw-r--r-- | test/test_environment.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_environment.lua b/test/test_environment.lua index 37bd38f1..f7cdcaa1 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua | |||
@@ -171,6 +171,10 @@ function test_env.set_args() | |||
171 | test_env.APPVEYOR_OPENSSL = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include" | 171 | test_env.APPVEYOR_OPENSSL = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include" |
172 | elseif argument:find("^os=") then | 172 | elseif argument:find("^os=") then |
173 | test_env.TEST_TARGET_OS = argument:match("^os=(.*)$") | 173 | test_env.TEST_TARGET_OS = argument:match("^os=(.*)$") |
174 | elseif argument == "mingw" then | ||
175 | test_env.MINGW = true | ||
176 | elseif argument == "msvc" then | ||
177 | test_env.MINGW = false | ||
174 | else | 178 | else |
175 | help() | 179 | help() |
176 | end | 180 | end |
@@ -629,11 +633,8 @@ local function install_luarocks(install_env_vars) | |||
629 | local testing_paths = test_env.testing_paths | 633 | local testing_paths = test_env.testing_paths |
630 | title("Installing LuaRocks") | 634 | title("Installing LuaRocks") |
631 | if test_env.TEST_TARGET_OS == "windows" then | 635 | if test_env.TEST_TARGET_OS == "windows" then |
632 | if test_env.LUA_V then | 636 | local compiler_flag = test_env.MINGW and "/MW" or "" |
633 | assert(execute_bool("install.bat /LUA " .. testing_paths.luadir .. " /LV " .. test_env.LUA_V .. " /P " .. testing_paths.testing_lrprefix .. " /NOREG /NOADMIN /F /Q /CONFIG " .. testing_paths.testing_lrprefix .. "/etc/luarocks", false, install_env_vars)) | 637 | assert(execute_bool("install.bat /LUA " .. testing_paths.luadir .. " " .. compiler_flag .. " /P " .. testing_paths.testing_lrprefix .. " /NOREG /NOADMIN /F /Q /CONFIG " .. testing_paths.testing_lrprefix .. "/etc/luarocks", false, install_env_vars)) |
634 | else | ||
635 | assert(execute_bool("install.bat /LUA " .. testing_paths.luadir .. " /P " .. testing_paths.testing_lrprefix .. " /NOREG /NOADMIN /F /Q /CONFIG " .. testing_paths.testing_lrprefix .. "/etc/luarocks", false, install_env_vars)) | ||
636 | end | ||
637 | assert(execute_bool(testing_paths.win_tools .. "/cp " .. testing_paths.testing_lrprefix .. "/lua/luarocks/site_config* " .. testing_paths.src_dir .. "/luarocks/site_config.lua")) | 638 | assert(execute_bool(testing_paths.win_tools .. "/cp " .. testing_paths.testing_lrprefix .. "/lua/luarocks/site_config* " .. testing_paths.src_dir .. "/luarocks/site_config.lua")) |
638 | else | 639 | else |
639 | local configure_cmd = "./configure --with-lua=" .. testing_paths.luadir .. " --prefix=" .. testing_paths.testing_lrprefix | 640 | local configure_cmd = "./configure --with-lua=" .. testing_paths.luadir .. " --prefix=" .. testing_paths.testing_lrprefix |