diff options
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index da4d1e5..cb20fb1 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -146,6 +146,12 @@ function(run_cmake test) "|clang[^:]*: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled:" "|Error kstat returned" "|Hit xcodebuild bug" + + "|LICENSE WARNING:" + "|Your license to use PGI[^\n]*expired" + "|Please obtain a new version at" + "|contact PGI Sales at" + "|[^\n]*xcodebuild[^\n]*warning: file type[^\n]*is based on missing file type" "|[^\n]*is a member of multiple groups" "|[^\n]*from Time Machine by path" @@ -204,5 +210,28 @@ function(run_cmake_with_options test) run_cmake(${test}) endfunction() +function(ensure_files_match expected_file actual_file) + if(NOT EXISTS "${expected_file}") + message(FATAL_ERROR "Expected file does not exist:\n ${expected_file}") + endif() + if(NOT EXISTS "${actual_file}") + message(FATAL_ERROR "Actual file does not exist:\n ${actual_file}") + endif() + file(READ "${expected_file}" expected_file_content) + file(READ "${actual_file}" actual_file_content) + if(NOT "${expected_file_content}" STREQUAL "${actual_file_content}") + message(FATAL_ERROR "Actual file content does not match expected:\n + \n + expected file: ${expected_file}\n + expected content:\n + ${expected_file_content}\n + \n + actual file: ${actual_file}\n + actual content:\n + ${actual_file_content}\n + ") + endif() +endfunction() + # Protect RunCMake tests from calling environment. unset(ENV{MAKEFLAGS}) |