Browse Source

RunCMake: Allow specifying the stderr file for a test.

Stephen Kelly 11 years ago
parent
commit
c0d8e71591
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Tests/RunCMake/RunCMake.cmake

+ 4 - 1
Tests/RunCMake/RunCMake.cmake

@@ -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()