瀏覽代碼

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 <[email protected]>
Simon McVittie 1 周之前
父節點
當前提交
c81b4e8493
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      test/CMakeLists.txt

+ 3 - 1
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)