Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
When RunCMake tests run under Xcode Guard Malloc, Guard Malloc may add lines of the form "<tool>(<pid>) malloc:..." to the output. Remove such lines from the actual output before matching it against the expected output.
This commit is contained in:
parent
57f2aa7c37
commit
69de0f7ea4
|
@ -83,7 +83,7 @@ function(run_cmake test)
|
||||||
endif()
|
endif()
|
||||||
foreach(o out err)
|
foreach(o out err)
|
||||||
string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}")
|
string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}")
|
||||||
string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}")
|
string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage|[a-z]+\\([0-9]+\\) malloc:)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}")
|
||||||
string(REGEX REPLACE "\n+$" "" actual_std${o} "${actual_std${o}}")
|
string(REGEX REPLACE "\n+$" "" actual_std${o} "${actual_std${o}}")
|
||||||
set(expect_${o} "")
|
set(expect_${o} "")
|
||||||
if(DEFINED expect_std${o})
|
if(DEFINED expect_std${o})
|
||||||
|
|
Loading…
Reference in New Issue