summaryrefslogtreecommitdiffstats
path: root/Tests/Contracts/Trilinos/ValidateBuild.cmake.in
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2013-08-28 19:28:14 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2013-08-28 19:28:14 (GMT)
commit5a4a5841d4b003ee3e8e62a4c1114235582cb5c4 (patch)
treefab658a6e376ab5d432f03a19549b90359bc67f8 /Tests/Contracts/Trilinos/ValidateBuild.cmake.in
parentb6f6802b3d0dc1a9ab7beb62a17bd0651d87a64f (diff)
downloadCMake-5a4a5841d4b003ee3e8e62a4c1114235582cb5c4.zip
CMake-5a4a5841d4b003ee3e8e62a4c1114235582cb5c4.tar.gz
CMake-5a4a5841d4b003ee3e8e62a4c1114235582cb5c4.tar.bz2
update Trilinos contract test
The old version encountered a compile error on newer versions of GCC. Update to the latest supported release of Trilinos, remove the version number from the name of the Contract, and some other minor tweaks to get the test passing once more.
Diffstat (limited to 'Tests/Contracts/Trilinos/ValidateBuild.cmake.in')
-rw-r--r--Tests/Contracts/Trilinos/ValidateBuild.cmake.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/Tests/Contracts/Trilinos/ValidateBuild.cmake.in b/Tests/Contracts/Trilinos/ValidateBuild.cmake.in
new file mode 100644
index 0000000..fa38ada
--- /dev/null
+++ b/Tests/Contracts/Trilinos/ValidateBuild.cmake.in
@@ -0,0 +1,39 @@
+#
+# This code validates that the Trilinos build was "successful enough" (since it
+# is difficult to detect this from the caller of the experimental_build_test
+# dashboard script...)
+#
+set(binary_dir "@binary_dir@")
+message("binary_dir='${binary_dir}'")
+
+
+# Count *.exe files:
+#
+file(GLOB_RECURSE exes "${binary_dir}/*.exe")
+message(STATUS "exes='${exes}'")
+list(LENGTH exes len)
+if(len LESS 47)
+ message(FATAL_ERROR "len='${len}' is less than minimum expected='47' (count of executables)")
+endif()
+message(STATUS "Found len='${len}' *.exe files")
+
+
+# Try to find the Teuchos unit tests executable:
+#
+file(GLOB_RECURSE exe "${binary_dir}/TeuchosCore_UnitTest_UnitTests.exe")
+list(LENGTH exe len)
+if(NOT len EQUAL 1)
+ message(FATAL_ERROR "len='${len}' is not the expected='1' (count of TeuchosCore_UnitTest_UnitTests.exe)")
+endif()
+message(STATUS "Found exe='${exe}'")
+
+
+# Try to run it:
+execute_process(COMMAND ${exe} RESULT_VARIABLE rv)
+if(NOT "${rv}" STREQUAL "0")
+ message(FATAL_ERROR "rv='${rv}' is not the expected='0' (result of running TeuchosCore_UnitTest_UnitTests.exe)")
+endif()
+message(STATUS "Ran exe='${exe}' rv='${rv}'")
+
+
+message(STATUS "All Trilinos build validation tests pass.")