summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-01-13 16:17:17 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-01-13 19:34:31 +0000
commit1e5c279c22c8744cbcedabf70a5b526a84b5302f (patch)
treea9c6e2ab7004a55252a24653aa3a61d96527f6f9 /cmake
parent4bbff3fa215a7200cc6a9cd445e99efda219805c (diff)
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 <joerg.bornemann@qt.io> (cherry picked from commit 7582f7b03d52103c5299812aed8705d21d4f8b9b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtTestHelpers.cmake3
1 files changed, 2 insertions, 1 deletions
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()