From 10a3859809fc0b6e1edd6cbb93e409f0513a9bbe Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 24 Dec 2024 12:35:39 +0100 Subject: [PATCH] Use the 'call' command when generating the command scripts cmd.exe has a huge problem when running the batch scripts locating by paths contaning spaces and more the one set of quotes in arguments. This can be worked around by using the 'call' command as the test command runner. Fixes: QTBUG-132258 Pick-to: 6.5 6.8 6.9 Change-Id: I9b6fb0f8bccf44456e4cb9b79f3c6bd3f9fe4678 Reviewed-by: Even Oscar Andersen Reviewed-by: Alexandru Croitor --- cmake/QtPublicTestHelpers.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/QtPublicTestHelpers.cmake b/cmake/QtPublicTestHelpers.cmake index c7f48bfe88c..af59bc168b5 100644 --- a/cmake/QtPublicTestHelpers.cmake +++ b/cmake/QtPublicTestHelpers.cmake @@ -68,7 +68,10 @@ is not specified") # It's necessary to call actual test inside 'cmd.exe', because 'execute_process' uses # SW_HIDE to avoid showing a console window, it affects other GUI as well. # See https://gitlab.kitware.com/cmake/cmake/-/issues/17690 for details. - set(extra_runner "cmd /c") + # + # Run the command using the proxy 'call' command to avoid issues related to invalid + # processing of quotes and spaces in cmd.exe arguments. + set(extra_runner "cmd /c call") endif() if(arg_PRE_RUN)