diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2016-08-23 13:23:25 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 13:23:25 -0300 |
commit | 9907ae567205777873e47b74c44d163367860d52 (patch) | |
tree | 09626863e8556a9803013a33ae3a5cef66cff258 /test | |
parent | 4c837a0c953f0dd83485d65979893c3c773eb1ba (diff) | |
parent | 00c12a63ed41c1506b84d5682d8c457c40ae8872 (diff) | |
download | luarocks-9907ae567205777873e47b74c44d163367860d52.tar.gz luarocks-9907ae567205777873e47b74c44d163367860d52.tar.bz2 luarocks-9907ae567205777873e47b74c44d163367860d52.zip |
Merge pull request #608 from keplerproject/mingw
Run Windows tests with 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 ab6c3edd..00213d31 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua | |||
@@ -172,6 +172,10 @@ function test_env.set_args() | |||
172 | test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include" | 172 | test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include" |
173 | elseif argument:find("^os=") then | 173 | elseif argument:find("^os=") then |
174 | test_env.TEST_TARGET_OS = argument:match("^os=(.*)$") | 174 | test_env.TEST_TARGET_OS = argument:match("^os=(.*)$") |
175 | elseif argument == "mingw" then | ||
176 | test_env.MINGW = true | ||
177 | elseif argument == "vs" then | ||
178 | test_env.MINGW = false | ||
175 | else | 179 | else |
176 | help() | 180 | help() |
177 | end | 181 | end |
@@ -630,11 +634,8 @@ local function install_luarocks(install_env_vars) | |||
630 | local testing_paths = test_env.testing_paths | 634 | local testing_paths = test_env.testing_paths |
631 | title("Installing LuaRocks") | 635 | title("Installing LuaRocks") |
632 | if test_env.TEST_TARGET_OS == "windows" then | 636 | if test_env.TEST_TARGET_OS == "windows" then |
633 | if test_env.LUA_V then | 637 | local compiler_flag = test_env.MINGW and "/MW" or "" |
634 | 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)) | 638 | 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)) |
635 | else | ||
636 | 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)) | ||
637 | end | ||
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")) | 639 | assert(execute_bool(testing_paths.win_tools .. "/cp " .. testing_paths.testing_lrprefix .. "/lua/luarocks/site_config* " .. testing_paths.src_dir .. "/luarocks/site_config.lua")) |
639 | else | 640 | else |
640 | local configure_cmd = "./configure --with-lua=" .. testing_paths.luadir .. " --prefix=" .. testing_paths.testing_lrprefix | 641 | local configure_cmd = "./configure --with-lua=" .. testing_paths.luadir .. " --prefix=" .. testing_paths.testing_lrprefix |