diff options
author | Brad King <brad.king@kitware.com> | 2017-10-10 13:35:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-10-10 13:35:31 (GMT) |
commit | 3f567a98470ffa812783a749f052ee1e6ae1d202 (patch) | |
tree | 1886bcdbf3bb04ab519c9cac7231fe0867dc7ff1 /Tests/RunCMake/RunCMake.cmake | |
parent | 8af7a16be7290b84c233c5e7749600aa57c4a28a (diff) | |
download | CMake-3f567a98470ffa812783a749f052ee1e6ae1d202.zip CMake-3f567a98470ffa812783a749f052ee1e6ae1d202.tar.gz CMake-3f567a98470ffa812783a749f052ee1e6ae1d202.tar.bz2 |
Tests: Refactor RunCMake output line ignore regex construction
Avoid one giant line.
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 26312c4..f54ef69 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -99,9 +99,20 @@ function(run_cmake test) if(NOT "${actual_result}" MATCHES "${expect_result}") string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n") endif() + string(CONCAT ignore_line_regex + "(^|\n)((==[0-9]+==" + "|BullseyeCoverage" + "|[a-z]+\\([0-9]+\\) malloc:" + "|Error kstat returned" + "|Hit xcodebuild bug" + "|[^\n]*is a member of multiple groups" + "|[^\n]*from Time Machine by path" + "|[^\n]*Bullseye Testing Technology" + ")[^\n]*\n)+" + ) foreach(o out err) string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}") - string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage|[a-z]+\\([0-9]+\\) malloc:|Error kstat returned|Hit xcodebuild bug|[^\n]*is a member of multiple groups|[^\n]*from Time Machine by path|[^\n]*Bullseye Testing Technology)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}") + string(REGEX REPLACE "${ignore_line_regex}" "\\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}) |