RunCMake: Allow specifying the stderr file for a test.

This commit is contained in:
Stephen Kelly 2015-02-09 08:41:06 +01:00
parent 68d29f5190
commit c0d8e71591
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ function(run_cmake test)
set(expect_result 0)
endif()
foreach(o out err)
if(EXISTS ${top_src}/${test}-std${o}.txt)
if(RunCMake-std${o}-file AND EXISTS ${top_src}/${RunCMake-std${o}-file})
file(READ ${top_src}/${RunCMake-std${o}-file} expect_std${o})
string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}")
elseif(EXISTS ${top_src}/${test}-std${o}.txt)
file(READ ${top_src}/${test}-std${o}.txt expect_std${o})
string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}")
else()