From: Matthias Maier Date: Mon, 31 Aug 2015 01:17:13 +0000 (-0500) Subject: Testsuite: Bugfix: Fix mpi tests X-Git-Tag: v8.4.0-rc2~509^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc96d4c67149190e7b8ec8445595c0334e789ee6;p=dealii.git Testsuite: Bugfix: Fix mpi tests MPI test results and diffs are stored at a different location than the files for ordinary tests. Fix run_test.cmake to take that into account. Safeguard against possible further changes by checking whether we have guessed the location correctly prior to reading the diff file. We output the file contents (which is either empty or explains against which variant we successfully compared) for informational reasons anyway... --- diff --git a/cmake/scripts/run_test.cmake b/cmake/scripts/run_test.cmake index 242411c507..2ba1fc8881 100644 --- a/cmake/scripts/run_test.cmake +++ b/cmake/scripts/run_test.cmake @@ -91,7 +91,21 @@ MESSAGE("=============================== OUTPUT BEGIN ======================= IF("${_stage}" STREQUAL "PASSED") STRING(REGEX REPLACE ".*\\/" "" _test ${TEST}) - FILE(READ ${BINARY_DIR}/${_test}/diff _diff) + # + # MPI tests have a special runtime directory so rename: + # test.mpirun=X.BUILD -> test.BUILD/mpirun=X + # + STRING(REGEX REPLACE "\\.(mpirun=[0-9]+)(\\..*)" "\\2/\\1" _test ${_test}) + # + # Also output the diff file if we guessed the location correctly. This is + # solely for cosmetic reasons: The diff file is either empty (if + # comparison against the main comparison file was successful) or contains + # a string explaining which comparison file variant succeeded. + # + SET(_diff "") + IF(EXISTS ${BINARY_DIR}/${_test}/diff) + FILE(READ ${BINARY_DIR}/${_test}/diff _diff) + ENDIF() MESSAGE("${_diff}${TEST}: PASSED.") ELSE()