v0.16.3
Loading...
Searching...
No Matches
ExpectSetupFailure.cmake
Go to the documentation of this file.
1# Check the diagnostic as well as the exit status: an unrelated mesh or MPI
2# failure must not count as an unsupported-formulation test passing.
3execute_process(
4 COMMAND "${EP_MPI_RUN}" ${EP_MPI_RUN_FLAGS} -np 1
5 "${EP_EXECUTABLE}" ${EP_OPTIONS}
6 RESULT_VARIABLE result
7 OUTPUT_VARIABLE output
8 ERROR_VARIABLE error
9 TIMEOUT 60)
10
11set(log "${output}\n${error}")
12file(WRITE "setup_failure.log" "${log}")
13if(NOT result MATCHES "^[1-9][0-9]*$" OR
14 NOT log MATCHES "${EP_EXPECTED_ERROR}")
15 message(FATAL_ERROR
16 "Expected setup failure '${EP_EXPECTED_ERROR}', got '${result}':\n${log}")
17endif()