diff options
author | David Cole <david.cole@kitware.com> | 2010-12-28 16:27:56 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-12-28 16:27:56 (GMT) |
commit | 81136214f3a45c84686461eab3917b6e1115f771 (patch) | |
tree | 2f53d1c08f722a88d1e7e65692de8c8b589e2b89 /Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in | |
parent | 73485615b2d66123b4952118440612d4f7bc9d0a (diff) | |
download | CMake-81136214f3a45c84686461eab3917b6e1115f771.zip CMake-81136214f3a45c84686461eab3917b6e1115f771.tar.gz CMake-81136214f3a45c84686461eab3917b6e1115f771.tar.bz2 |
Establish pass criteria for the Trilinos contract test.
Add a ValidateBuild.cmake script that runs after the Trilinos
dashboard run is complete. In that script, look for some expected
Trilinos executable files. Run the basic Teuchos unit tests
executable and expect it to return 0 for no errors.
Also, patch the main CMakeLists.txt file to get rid of new warnings
from CMake when variables passed in on the command line go
un-referenced in the CMakeLists processing.
Diffstat (limited to 'Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in')
-rw-r--r-- | Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in b/Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in new file mode 100644 index 0000000..04bbf21 --- /dev/null +++ b/Tests/Contracts/Trilinos-10-6/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}/Teuchos_UnitTest_UnitTests.exe") +list(LENGTH exe len) +if(NOT len EQUAL 1) + message(FATAL_ERROR "len='${len}' is not the expected='1' (count of Teuchos_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 Teuchos_UnitTest_UnitTests.exe)") +endif() +message(STATUS "Ran exe='${exe}' rv='${rv}'") + + +message(STATUS "All Trilinos build validation tests pass.") |