diff --git a/CMakeLists.txt b/CMakeLists.txt index 805e67cde..30854a322 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -412,14 +412,14 @@ if ("${TEST_MANUAL_SCREENS}" MATCHES "1") endif() add_custom_target(check-integration - ${CMAKE_COMMAND} -E env CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}' ${TESTS_RUN_ENV} ./tests/run.sh \$\${TEST_RUN_ARGS:--W} + ${CMAKE_COMMAND} -E env CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}' LUA_EXECUTABLE='${LUA_EXECUTABLE}' ${TESTS_RUN_ENV} ./tests/run.sh \$\${TEST_RUN_ARGS:--W} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Running integration tests" DEPENDS ${PROJECT_AWE_NAME} USES_TERMINAL) add_dependencies(check-integration test-gravity) add_custom_target(check-themes - ${CMAKE_COMMAND} -E env CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}' ${TESTS_RUN_ENV} ./tests/themes/run.sh + ${CMAKE_COMMAND} -E env CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}' LUA_EXECUTABLE='${LUA_EXECUTABLE}' ${TESTS_RUN_ENV} ./tests/themes/run.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Testing themes" USES_TERMINAL diff --git a/tests/_client.lua b/tests/_client.lua index 31b9c6188..b06b6f60f 100644 --- a/tests/_client.lua +++ b/tests/_client.lua @@ -106,7 +106,7 @@ local pipe local function init() if initialized then return end initialized = true - local cmd = { "lua", "-e", test_client_source } + local cmd = { os.getenv("LUA_EXECUTABLE"), "-e", test_client_source } local _, _, stdin, stdout, stderr = awesome.spawn(cmd, false, true, true, true) pipe = Gio.UnixOutputStream.new(stdin, true) stdout = Gio.UnixInputStream.new(stdout, true) diff --git a/tests/test-selection-getter.lua b/tests/test-selection-getter.lua index 682dbc812..0c8fbdbc7 100644 --- a/tests/test-selection-getter.lua +++ b/tests/test-selection-getter.lua @@ -48,7 +48,7 @@ runner.run_steps{ -- Clear the clipboard to get to a known state function() - spawn.with_line_callback({ "lua", "-e", acquire_and_clear_clipboard }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_and_clear_clipboard }, { exit = function() continue = true end }) return true end, @@ -79,7 +79,7 @@ runner.run_steps{ -- Now set the clipboard to some text continue = false - spawn.with_line_callback({ "lua", "-e", acquire_clipboard_text }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_clipboard_text }, { stdout = function(line) assert(line == "initialisation done", "Unexpected line: " .. line) @@ -143,7 +143,7 @@ runner.run_steps{ -- Now set the clipboard to an image continue = false - spawn.with_line_callback({ "lua", "-e", acquire_clipboard_pixbuf }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_clipboard_pixbuf }, { stdout = function(line) assert(line == "initialisation done", "Unexpected line: " .. line) diff --git a/tests/test-selection-transfer.lua b/tests/test-selection-transfer.lua index 506eca267..d3d5936f3 100644 --- a/tests/test-selection-transfer.lua +++ b/tests/test-selection-transfer.lua @@ -86,7 +86,7 @@ runner.run_steps({ end end) awesome.sync() - spawn.with_line_callback({ "lua", "-e", check_targets_and_text }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", check_targets_and_text }, { stdout = function(line) assert(line == "done", "Unexpected line: " .. line) continue = true @@ -124,7 +124,7 @@ runner.run_steps({ end end) awesome.sync() - spawn.with_line_callback({ "lua", "-e", check_targets_and_text }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", check_targets_and_text }, { stdout = function(line) assert(line == "done", "Unexpected line: " .. line) continue = true @@ -161,7 +161,7 @@ runner.run_steps({ end end) awesome.sync() - spawn.with_line_callback({ "lua", "-e", check_large_transfer }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", check_large_transfer }, { stdout = function(line) assert(line == "done", "Unexpected line: " .. line) continue = true @@ -177,7 +177,7 @@ runner.run_steps({ -- Now test that :release() works selection_object:release() awesome.sync() - spawn.with_line_callback({ "lua", "-e", check_empty_selection }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", check_empty_selection }, { stdout = function(line) assert(line == "done", "Unexpected line: " .. line) continue = true @@ -196,7 +196,7 @@ runner.run_steps({ "Failed to acquire the clipboard selection") selection_object:connect_signal("release", function() selection_released = true end) awesome.sync() - spawn.with_line_callback({ "lua", "-e", acquire_and_clear_clipboard }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_and_clear_clipboard }, { exit = function() continue = true end }) return true end, diff --git a/tests/test-selection-watcher.lua b/tests/test-selection-watcher.lua index 6142cf707..b58552461 100644 --- a/tests/test-selection-watcher.lua +++ b/tests/test-selection-watcher.lua @@ -62,7 +62,7 @@ runner.run_steps{ -- Clear the clipboard to get to a known state function() check_state(0, 0) - spawn.with_line_callback({ "lua", "-e", acquire_and_clear_clipboard }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_and_clear_clipboard }, { exit = function() continue = true end }) return true end, @@ -81,7 +81,7 @@ runner.run_steps{ -- Set the clipboard continue = false - spawn.with_line_callback({ "lua", "-e", acquire_clipboard }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_clipboard }, { stdout = function(line) assert(line == "initialisation done", "Unexpected line: " .. line) @@ -100,7 +100,7 @@ runner.run_steps{ -- Now clear the clipboard again continue = false - spawn.with_line_callback({ "lua", "-e", acquire_and_clear_clipboard }, + spawn.with_line_callback({ os.getenv("LUA_EXECUTABLE"), "-e", acquire_and_clear_clipboard }, { exit = function() continue = true end }) return true diff --git a/tests/test-spawn.lua b/tests/test-spawn.lua index 4fb9ffb96..8c725eb9b 100644 --- a/tests/test-spawn.lua +++ b/tests/test-spawn.lua @@ -11,7 +11,7 @@ local exit_yay, exit_snd = nil, nil -- * spawn with startup notification is covered by test-spawn-snid.lua local tiny_client = function(class) - return {"lua", "-e", [[ + return {os.getenv("LUA_EXECUTABLE"), "-e", [[ local lgi = require 'lgi' local Gtk = lgi.require('Gtk') local class = ']]..class..[[' diff --git a/tests/test-titlebar.lua b/tests/test-titlebar.lua index 9359ce8b9..5df1a2fda 100644 --- a/tests/test-titlebar.lua +++ b/tests/test-titlebar.lua @@ -18,8 +18,8 @@ function app:on_activate() end app:run {''} ]] -local tiny_client = {"lua", "-e", string.format(tiny_client_code_template, "")} -local tiny_client_undecorated = {"lua", "-e", +local tiny_client = {os.getenv("LUA_EXECUTABLE"), "-e", string.format(tiny_client_code_template, "")} +local tiny_client_undecorated = {os.getenv("LUA_EXECUTABLE"), "-e", string.format(tiny_client_code_template, [[ window.decorated = false ]])