File: ValidateBuild.cmake.in

package info (click to toggle)
cmake 2.8.11.1-1~bpo70+1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 37,056 kB
  • sloc: cpp: 157,219; ansic: 137,155; yacc: 3,254; sh: 2,745; xml: 2,483; lex: 1,028; lisp: 215; python: 199; objc: 134; f90: 105; perl: 99; fortran: 93; makefile: 65; tcl: 55; asm: 28; php: 25; ruby: 22; java: 20
file content (39 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.")