Commit 49533303 authored by Brad King's avatar Brad King

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.
parent 094df7c5
......@@ -52,6 +52,7 @@ function(run_cmake test)
set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n")
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})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment