aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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