From: Timo Heister Date: Thu, 4 Feb 2016 23:17:49 +0000 (-0500) Subject: handle empty test output X-Git-Tag: v8.4.0-rc2~39^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbede6225effcd5d0d038091ba12e6a131546887;p=dealii.git handle empty test output If the make command to compile a test returns empty output (don't ask me why that happened on my machine), quote it in the regex to avoid an error like: "string sub-command REGEX, mode MATCH needs at least 5 arguments" --- diff --git a/cmake/scripts/run_test.cmake b/cmake/scripts/run_test.cmake index a95795e7e1..78f813901d 100644 --- a/cmake/scripts/run_test.cmake +++ b/cmake/scripts/run_test.cmake @@ -64,11 +64,11 @@ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} # (Possible values are CONFIGURE, BUILD, RUN, DIFF, PASSED) # -STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex ${_output}) -STRING(REGEX MATCH "${TEST}: BUILD failed\\." _build_regex ${_output}) -STRING(REGEX MATCH "${TEST}: RUN failed\\." _run_regex ${_output}) -STRING(REGEX MATCH "${TEST}: DIFF failed\\." _diff_regex ${_output}) -STRING(REGEX MATCH "${TEST}: PASSED\\." _passed_regex ${_output}) +STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex "${_output}") +STRING(REGEX MATCH "${TEST}: BUILD failed\\." _build_regex "${_output}") +STRING(REGEX MATCH "${TEST}: RUN failed\\." _run_regex "${_output}") +STRING(REGEX MATCH "${TEST}: DIFF failed\\." _diff_regex "${_output}") +STRING(REGEX MATCH "${TEST}: PASSED\\." _passed_regex "${_output}") IF(NOT "${_passed_regex}" STREQUAL "") SET(_stage PASSED) @@ -115,7 +115,7 @@ ELSE() # Some special output in case the BUILD stage failed in a regression test: MESSAGE("${TEST}: BUILD failed. Output:") ENDIF() - MESSAGE(${_output}) + MESSAGE("${_output}") MESSAGE("") MESSAGE("${TEST}: ****** ${_stage} failed *******") MESSAGE("")