From c81b4e84937d770676c705b751a5c591291ce677 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 30 Sep 2025 13:29:20 +0100 Subject: [PATCH] test: Space-separate arguments in as-installed tests' .test files The "as-installed" tests have metadata files in the .desktop-like format used by gnome-desktop-testing, which uses a subset of shell syntax for the Exec field. The list of arguments is represented as a semicolon-separated list by CMake, but we need to convert that into a space-separated list for the Exec field. Strictly speaking we should be quoting the arguments with the equivalent of Python's shlex.quote, but I couldn't find a way to do that in CMake, and currently none of the tests have arguments that need quoting. Signed-off-by: Simon McVittie --- test/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 640d02b869..29d0c33f86 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -599,7 +599,9 @@ function(add_sdl_test TEST TARGET) set(command ${TARGET}) endif() get_property(noninteractive_arguments TARGET ${TARGET} PROPERTY SDL_NONINTERACTIVE_ARGUMENTS) - get_property(installed_arguments TARGET ${TARGET} PROPERTY SDL_INSTALLED_ARGUMENTS) + get_property(installed_arguments_list TARGET ${TARGET} PROPERTY SDL_INSTALLED_ARGUMENTS) + # This assumes that none of the arguments need quoting + list(JOIN installed_arguments_list " " installed_arguments) get_property(disable_threads_args TARGET ${TARGET} PROPERTY SDL_DISABLE_THREADS_ARGS) get_property(uses_threads TARGET ${TARGET} PROPERTY SDL_THREADS) if(noninteractive_arguments)