mirror of
https://github.com/reactos/CMake.git
synced 2025-01-07 11:40:23 +00:00
Tests: Refactor RunCMake output line ignore regex construction
Avoid one giant line.
This commit is contained in:
parent
8af7a16be7
commit
3f567a9847
@ -99,9 +99,20 @@ function(run_cmake test)
|
|||||||
if(NOT "${actual_result}" MATCHES "${expect_result}")
|
if(NOT "${actual_result}" MATCHES "${expect_result}")
|
||||||
string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n")
|
string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n")
|
||||||
endif()
|
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)
|
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|[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}}")
|
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
Block a user