QtTestHelpers: print exit code upon failure

This might give a few insights into why the process has failed, at least
if distinct return values are used for different errors.

Change-Id: I61fe0ede812c4dda3d0cf0f2c96a479d198d340d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 3ef6af024be43bc18352796df61542a241192583)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Fabian Kosmale 2021-12-15 09:00:47 +01:00 committed by Alexandru Croitor
parent 3a051c4fca
commit bbe872839e

View File

@ -577,7 +577,7 @@ execute_process(COMMAND ${extra_runner} ${arg_COMMAND}
${post_run}
if(NOT result EQUAL 0)
string(JOIN \" \" full_command ${arg_COMMAND})
message(FATAL_ERROR \"\${full_command} execution failed.\")
message(FATAL_ERROR \"\${full_command} execution failed with exit code ${result}.\")
endif()"
)
endfunction()