aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-06-25 12:06:26 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-07-01 15:51:36 -0300
commitf056938237f82845e9d3b4924cac483a4bbb7b20 (patch)
tree0627aa99a6502c34cbeef3e91d3dc481279c9d2b
parent4e7adb99bf4a8ec72e2c9e0785d1b356ba173d4b (diff)
downloadluarocks-f056938237f82845e9d3b4924cac483a4bbb7b20.tar.gz
luarocks-f056938237f82845e9d3b4924cac483a4bbb7b20.tar.bz2
luarocks-f056938237f82845e9d3b4924cac483a4bbb7b20.zip
Tests: try some smarter defaults for Windows
-rw-r--r--spec/util/test_env.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua
index 22a2ad41..0491f90f 100644
--- a/spec/util/test_env.lua
+++ b/spec/util/test_env.lua
@@ -523,15 +523,18 @@ end
523local function create_paths(luaversion_full) 523local function create_paths(luaversion_full)
524 524
525 local testing_paths = {} 525 local testing_paths = {}
526 testing_paths.luadir = (test_env.LUA_DIR or "/usr/local")
527 testing_paths.lua = testing_paths.luadir .. "/bin/" .. (test_env.LUA_INTERPRETER or "lua")
528
529 if test_env.TEST_TARGET_OS == "windows" then 526 if test_env.TEST_TARGET_OS == "windows" then
527 testing_paths.luadir = (test_env.LUA_DIR or os.getenv("ProgramFiles(x86)").."/LuaRocks")
530 testing_paths.luarocks_tmp = os.getenv("TEMP") 528 testing_paths.luarocks_tmp = os.getenv("TEMP")
531 else 529 else
530 testing_paths.luadir = (test_env.LUA_DIR or "/usr/local")
532 testing_paths.luarocks_tmp = "/tmp/luarocks_testing" 531 testing_paths.luarocks_tmp = "/tmp/luarocks_testing"
533 end 532 end
534 533
534 testing_paths.lua = test_env.file_if_exists(testing_paths.luadir .. "/bin/" .. (test_env.LUA_INTERPRETER or "lua"))
535 or test_env.file_if_exists(testing_paths.luadir .. "/" .. (test_env.LUA_INTERPRETER or "lua"))
536 assert(testing_paths.lua, "Lua interpreter not found! Run `busted -Xhelper help` for options")
537
535 local base_dir = lfs.currentdir() 538 local base_dir = lfs.currentdir()
536 539
537 if test_env.TEST_TARGET_OS == "windows" then 540 if test_env.TEST_TARGET_OS == "windows" then