From 3f567a98470ffa812783a749f052ee1e6ae1d202 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 10 Oct 2017 09:35:31 -0400 Subject: Tests: Refactor RunCMake output line ignore regex construction Avoid one giant line. --- Tests/RunCMake/RunCMake.cmake | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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}) -- cgit v0.12 From 0be7d61abf970186b3a83cc6a2aebd3b208b0618 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 10 Oct 2017 09:37:08 -0400 Subject: Tests: Teach RunCMake to ignore clang unused sanitizer flag warnings These can show up in Release builds of CMake because some tests still build Debug. --- Tests/RunCMake/RunCMake.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index f54ef69..4fd816e 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -103,6 +103,7 @@ function(run_cmake test) "(^|\n)((==[0-9]+==" "|BullseyeCoverage" "|[a-z]+\\([0-9]+\\) malloc:" + "|clang[^:]*: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled:" "|Error kstat returned" "|Hit xcodebuild bug" "|[^\n]*is a member of multiple groups" -- cgit v0.12