Use Lua executable variable for check-integration

This commit is contained in:
Lucas Schwiderski 2021-03-06 17:35:25 +01:00
parent 19bf83b409
commit 6d0eb8660d
No known key found for this signature in database
GPG Key ID: AA12679AAA6DF4D8
7 changed files with 17 additions and 17 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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,

View File

@ -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

View File

@ -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..[['

View File

@ -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
]])