Skip to content
Snippets Groups Projects
Commit 9c6942e3 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[cmake] Always skip tests on return code 77, not only when specified

This IMO removes a source of error, reduces some lines of code
and only does harm in the case of an accidental return of 77 (which
I do not think will happen)
parent 75279b42
No related branches found
No related tags found
1 merge request!100Feature/improved cmake test skipping
......@@ -73,10 +73,6 @@
#
# If given, this test is expected to compile, but fail to run.
#
# .. cmake_param:: SKIP_ON_77
#
# The test will be marked as skipped in ctest if it returned 77.
#
# .. cmake_param:: CMD_ARGS
# :multi:
# :argname: arg
......@@ -210,6 +206,9 @@ function(dune_add_test)
message(FATAL_ERROR "${num} was given to the MPI_RANKS arugment of dune_add_test, but it does not seem like a correct processor number")
endif()
endforeach()
if(ADDTEST_SKIP_ON_77)
message(WARNING "The SKIP_ON_77 option for dune_add_test is obsolete, it is now enabled by default.")
endif()
# Discard all parallel tests if MPI was not found
if(NOT MPI_FOUND)
......@@ -269,10 +268,8 @@ function(dune_add_test)
if(ADDTEST_EXPECT_COMPILE_FAIL OR ADDTEST_EXPECT_FAIL)
set_tests_properties(${ACTUAL_NAME} PROPERTIES WILL_FAIL true)
endif()
# Process the SKIP_ON_77 option
if(ADDTEST_SKIP_ON_77)
set_tests_properties(${ACTUAL_NAME} PROPERTIES SKIP_RETURN_CODE 77)
endif()
# Skip the test if the return code is 77!
set_tests_properties(${ACTUAL_NAME} PROPERTIES SKIP_RETURN_CODE 77)
endif()
endforeach()
endfunction()
......
......@@ -2,15 +2,12 @@ dune_add_test(SOURCES indexsettest.cc
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES remoteindicestest.cc
LINK_LIBRARIES dunecommon
SKIP_ON_77)
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES selectiontest.cc
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES syncertest.cc
LINK_LIBRARIES dunecommon
SKIP_ON_77)
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES variablesizecommunicatortest.cc
SKIP_ON_77)
dune_add_test(SOURCES variablesizecommunicatortest.cc)
......@@ -73,8 +73,7 @@ dune_add_test(SOURCES lrutest.cc
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES mpicollectivecommunication.cc
LINK_LIBRARIES dunecommon
SKIP_ON_77)
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES mpiguardtest.cc
LINK_LIBRARIES dunecommon)
......@@ -89,8 +88,7 @@ dune_add_test(NAME mpihelpertest2
)
dune_add_test(SOURCES parametertreelocaletest.cc
LINK_LIBRARIES dunecommon
SKIP_ON_77)
LINK_LIBRARIES dunecommon)
dune_add_test(SOURCES parametertreetest.cc
LINK_LIBRARIES dunecommon)
......@@ -155,8 +153,7 @@ dune_add_test(SOURCES tupleutilitytest.cc)
if(${LAPACK_FOUND})
dune_add_test(SOURCES eigenvaluestest.cc
LINK_LIBRARIES dunecommon
SKIP_ON_77)
LINK_LIBRARIES dunecommon)
endif()
install(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment