diff options
author | Allen Winter <allen.winter@kdab.com> | 2014-09-26 13:29:49 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2014-09-26 13:29:49 -0400 |
commit | 3c13a34c712793823ee2536d8990879d768cf73a (patch) | |
tree | ce4b94f575d1bef362c9989f8f3b19ecefb3be91 /cmake/run_test.cmake | |
parent | 77d71e56b55670dc8f5e168efde153e6aa3c59ae (diff) | |
download | libical-git-3c13a34c712793823ee2536d8990879d768cf73a.tar.gz |
improve so it finishes consistently
Diffstat (limited to 'cmake/run_test.cmake')
-rw-r--r-- | cmake/run_test.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmake/run_test.cmake b/cmake/run_test.cmake index 2a1db8db..5aa5abbf 100644 --- a/cmake/run_test.cmake +++ b/cmake/run_test.cmake @@ -20,10 +20,20 @@ separate_arguments(test_args) execute_process( COMMAND ${test_cmd} ${test_args} + RESULT_VARIABLE test_not_successful + ERROR_VARIABLE err +) + +if(test_not_successful) + message(SEND_ERROR "Unable to run test '${test_cmd}': ${err} : shell output: ${test_not_successful}!") +endif() + +execute_process( COMMAND ${CMAKE_COMMAND} -E compare_files ${output_blessed} ${output_test} RESULT_VARIABLE test_not_successful + ERROR_VARIABLE err ) if(test_not_successful) - message(SEND_ERROR "${output_test} does not match ${output_blessed}!") + message(SEND_ERROR "Output does not match for ${output_blessed} and ${output_test}: ${err} : shell output: ${test_not_successful}!") endif() |