Merge topic 'tests-RunCMake-report-command'
6c121924
Tests: Teach RunCMake to report command-line on failure
This commit is contained in:
commit
c15a2fdd2e
|
@ -93,6 +93,10 @@ function(run_cmake test)
|
|||
if(RunCMake_TEST_FAILED)
|
||||
set(msg "${RunCMake_TEST_FAILED}\n${msg}")
|
||||
endif()
|
||||
if(msg AND RunCMake_TEST_COMMAND)
|
||||
string(REPLACE ";" "\" \"" command "\"${RunCMake_TEST_COMMAND}\"")
|
||||
set(msg "${msg}Command was:\n command> ${command}\n")
|
||||
endif()
|
||||
if(msg)
|
||||
string(REGEX REPLACE "\n" "\n actual-out> " actual_out " actual-out> ${actual_stdout}")
|
||||
string(REGEX REPLACE "\n" "\n actual-err> " actual_err " actual-err> ${actual_stderr}")
|
||||
|
|
Loading…
Reference in New Issue