From 1e5c279c22c8744cbcedabf70a5b526a84b5302f Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 13 Jan 2021 16:17:17 +0100 Subject: Fix warning in generated test wrappers Since test command variable may contain quotes, there is a warning in generated test wrappers related to 'message(FATAL_ERROR', that should display full command in log in case of error. To avoid any complicated quoting of command to only display it, join command into single string in wrapper script and pass resulting variable to 'message(FATAL_ERROR'. Change-Id: Ie990fc0b0bf2c19b119c7c4e2aeec092e5200103 Reviewed-by: Joerg Bornemann (cherry picked from commit 7582f7b03d52103c5299812aed8705d21d4f8b9b) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtTestHelpers.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake index 4bfa8f4619..5222f8a08d 100644 --- a/cmake/QtTestHelpers.cmake +++ b/cmake/QtTestHelpers.cmake @@ -559,7 +559,8 @@ execute_process(COMMAND ${extra_runner} ${arg_COMMAND} ) ${post_run} if(NOT result EQUAL 0) - message(FATAL_ERROR \"${arg_COMMAND} execution failed.\") + string(JOIN \" \" full_command ${arg_COMMAND}) + message(FATAL_ERROR \"\${full_command} execution failed.\") endif()" ) endfunction() -- cgit v1.2.3