]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Quick tests: update error message
authorMatthias Maier <tamiko@43-1.org>
Tue, 4 Jul 2023 14:35:09 +0000 (09:35 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 4 Jul 2023 20:15:54 +0000 (15:15 -0500)
tests/run_quick_tests.cmake

index 978d87c9ec4947341a76abb1af3bba40035dbcc6..e242ce2617a1380bc5258a44b5ee59eb5ec647f7 100644 (file)
@@ -65,7 +65,15 @@ execute_process(COMMAND ${CMAKE_CTEST_COMMAND}
   )
 file(WRITE quick_tests.log ${_output})
 
-if(NOT "${_return_value}" STREQUAL "0")
+if("${_return_value}" STREQUAL "0")
+  message("
+**************************************************************************
+
+                 ðŸŽ‰  ðŸŽ‰  ðŸŽ‰  All quick tests passed.  ðŸŽ‰  ðŸŽ‰  ðŸŽ‰
+
+**************************************************************************"
+    )
+else()
   message("
 **************************************************************************
 **                                                                      **
@@ -73,43 +81,36 @@ if(NOT "${_return_value}" STREQUAL "0")
 **                                                                      **
 **************************************************************************
 
-Check the files quick_tests.log and Testing/Temporary/LastTest.log located
-in your build directory for error messages. Alternatively, you can run all
-failing quick tests again via
+Check the terminal output above. You can run all failing quick tests again
+via  $ ctest --rerun-failed --output-on-failure -R quick_tests/
+
+If you need help with this problem, open a bug report on the issue tracker
 
-        $ ctest --rerun-failed --output-on-failure -R quick_tests/
+               https://github.com/dealii/dealii/issues/new
 
-If you are unable to fix this problem, write to the mailing list linked at
-https://www.dealii.org\n"
+or write to the mailing list linked at https://www.dealii.org/mail.html
+Please also add the files quick_tests.log , Testing/Temporary/LastTest.log
+to your bug report."
     )
 
+  set(_affinity_issue FALSE)
   string(REPLACE "\n" ";" _output "${_output}")
   foreach(_line ${_output})
-    if ("${_line}" MATCHES "affinity.*FAILED")
-      message("
+    if ("${_line}" MATCHES " Test .*quick_tests/affinity.*Failed.*sec")
+      set(_affinity_issue TRUE)
+    endif()
+  endforeach()
+  if(_affinity_issue)
+    message("
 The affinity test can fail when you are linking in a library like BLAS
 which uses OpenMP. Even without calling any BLAS functions, OpenMP messes
 with the thread affinity which causes TBB to run single-threaded only. You
 can fix this by exporting OMP_NUM_THREADS=1. Also see GOMP_CPU_AFFINITY
-and OMP_PROC_BIND.\n"
-        )
-    endif()
-
-    if (${_line} MATCHES "step-petsc.*FAILED")
-      message("
-Additional information about PETSc issues is available
-at:\nhttp://www.dealii.org/developer/external-libs/petsc.html\n"
-        )
-    endif()
+and OMP_PROC_BIND."
+      )
+  endif()
 
-    if (${test} MATCHES "p4est.*FAILED" AND NOT EXISTS ${test}-OK)
-      message("
-The p4est test can fail if you are running an OpenMPI version before 1.5.
-This is a known problem and the only work around is to update to a more
-recent version or use a different MPI library like MPICH.\n"
-        )
-    endif()
-  endforeach()
+  message("\n")
 
   # ensure that this script exits with a non-zero exit code
   message(FATAL_ERROR "quick tests failed")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.