File: test_hello.cmake

package info (click to toggle)
dh-cmake 0.6.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 396 kB
  • sloc: python: 2,255; perl: 26; makefile: 6; ansic: 6; sh: 2
file content (13 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
execute_process(
  COMMAND "${CTESTEXAMPLE_COMMAND}"
  RESULT_VARIABLE CTESTEXAMPLE_RESULT
  OUTPUT_VARIABLE CTESTEXAMPLE_OUTPUT
)

if(NOT CTESTEXAMPLE_RESULT EQUAL "0")
  message(FATAL_ERROR "ctestexample returned non-zero value\nActual result: ${CTESTEXAMPLE_RESULT}")
endif()

if(NOT CTESTEXAMPLE_OUTPUT STREQUAL "Hello world!\n")
  message(FATAL_ERROR "ctestexample did not print \"Hello world!\"\nActual result:\n${CTESTEXAMPLE_OUTPUT}")
endif()