diff options
author | Brad King <brad.king@kitware.com> | 2013-09-16 13:59:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-09-16 13:59:52 (GMT) |
commit | 49533303a5dd46b5eea04947849e1a31e859fb83 (patch) | |
tree | 16e59f88754226fb49fc7b3d764b47eed9bdbe8a /Tests | |
parent | 094df7c5e638f6b2c2f71ba327faca91b4c83d2f (diff) | |
download | CMake-49533303a5dd46b5eea04947849e1a31e859fb83.zip CMake-49533303a5dd46b5eea04947849e1a31e859fb83.tar.gz CMake-49533303a5dd46b5eea04947849e1a31e859fb83.tar.bz2 |
Tests/RunCMake: Tolerate valgrind lines in CMake output
When RunCMake tests run during dynamic analysis, valgrind may add lines
of the form "==[0-9]+==..." to the output. Remove such lines from the
actual output before matching it against the expected output.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 00faa4c..f770c93 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -52,6 +52,7 @@ function(run_cmake test) set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n") endif() foreach(o out err) + string(REGEX REPLACE "(^|\n)(==[0-9]+==[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}") string(REGEX REPLACE "\n+$" "" actual_std${o} "${actual_std${o}}") set(expect_${o} "") if(DEFINED expect_std${o}) |