diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-27 10:55:16 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 21:32:39 -0300 |
| commit | 9404d59d48a511983ed30a6d0f605041a74ff332 (patch) | |
| tree | 920340b4b019a2dff9c7eeaeab01314af386b547 /spec/util/test_env.lua | |
| parent | b7680a66385dde34c8e8dbdeafc22156425cb38c (diff) | |
| download | luarocks-9404d59d48a511983ed30a6d0f605041a74ff332.tar.gz luarocks-9404d59d48a511983ed30a6d0f605041a74ff332.tar.bz2 luarocks-9404d59d48a511983ed30a6d0f605041a74ff332.zip | |
Let LuaRocks find LUA_LIBDIR and LUA_INCDIR by itself
Diffstat (limited to 'spec/util/test_env.lua')
| -rw-r--r-- | spec/util/test_env.lua | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index fc292607..60162ee3 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
| @@ -547,14 +547,6 @@ local function create_paths(luaversion_full) | |||
| 547 | end | 547 | end |
| 548 | assert(testing_paths.lua, "Lua interpreter not found! Run `busted -Xhelper help` for options") | 548 | assert(testing_paths.lua, "Lua interpreter not found! Run `busted -Xhelper help` for options") |
| 549 | 549 | ||
| 550 | local incfile = test_env.file_if_exists(testing_paths.luadir .. "/include/lua/" .. test_env.lua_version .. "/lua.h") | ||
| 551 | or test_env.file_if_exists(testing_paths.luadir .. "/include/lua" .. test_env.lua_version .. "/lua.h") | ||
| 552 | or test_env.file_if_exists(testing_paths.luadir .. "/include/lua.h") | ||
| 553 | testing_paths.lua_incdir = assert(incfile, "Lua header lua.h not found!"):gsub("/lua.h$", "") | ||
| 554 | |||
| 555 | testing_paths.lua_libdir = test_env.file_if_exists(testing_paths.luadir .. "/lib") | ||
| 556 | or test_env.file_if_exists(testing_paths.luadir) | ||
| 557 | |||
| 558 | local base_dir = lfs.currentdir() | 550 | local base_dir = lfs.currentdir() |
| 559 | 551 | ||
| 560 | if test_env.TEST_TARGET_OS == "windows" then | 552 | if test_env.TEST_TARGET_OS == "windows" then |
| @@ -770,8 +762,6 @@ local function setup_luarocks() | |||
| 770 | "return {", | 762 | "return {", |
| 771 | ("SYSCONFDIR = %q,"):format(testing_paths.testing_lrprefix .. "/etc/luarocks"), | 763 | ("SYSCONFDIR = %q,"):format(testing_paths.testing_lrprefix .. "/etc/luarocks"), |
| 772 | ("LUA_DIR = %q,"):format(testing_paths.luadir), | 764 | ("LUA_DIR = %q,"):format(testing_paths.luadir), |
| 773 | ("LUA_INCDIR = %q,"):format(testing_paths.lua_incdir), | ||
| 774 | ("LUA_LIBDIR = %q,"):format(testing_paths.lua_libdir), | ||
| 775 | ("LUA_BINDIR = %q,"):format(testing_paths.lua_bindir), | 765 | ("LUA_BINDIR = %q,"):format(testing_paths.lua_bindir), |
| 776 | ("LUA_INTERPRETER = %q,"):format(testing_paths.lua_interpreter), | 766 | ("LUA_INTERPRETER = %q,"):format(testing_paths.lua_interpreter), |
| 777 | } | 767 | } |
