diff --git a/bin/runTest.sh b/bin/runTest.sh index a59190b7704e5c5e290b591176362cd3f8e252ab..273108805304bdd35c91b6501afcef537181fc9a 100755 --- a/bin/runTest.sh +++ b/bin/runTest.sh @@ -35,14 +35,16 @@ if ! test -r "$REFERENCE_RESULT"; then usage exit 1 fi - + #run the test echo "######################" echo "# Running test" echo "######################" -if ! $TEST_BINARY $TEST_ARGS; then - echo "Executing the binary failed!" - exit 1 +$TEST_BINARY $TEST_ARGS +RETURN_CODE_TEST_BINARY=$? +if test "$RETURN_CODE_TEST_BINARY" != "0"; then + echo "Return code: $RETURN_CODE_TEST_BINARY" + exit $RETURN_CODE_TEST_BINARY fi # compare the results diff --git a/cmake/modules/DumuxTestMacros.cmake b/cmake/modules/DumuxTestMacros.cmake index 83dd70040f3ede40cc18f138933ea3f78950afb9..7a137fb866e82fc151ec38022b9dfbdde95df087 100644 --- a/cmake/modules/DumuxTestMacros.cmake +++ b/cmake/modules/DumuxTestMacros.cmake @@ -59,6 +59,9 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour # add test add_test(${dumux_test} ${dumux_test_args}) add_dependencies(${_test_target} ${dumux_test_executable}) + + # return code 77 should be interpreted as skipped test + set_tests_properties(${dumux_test} PROPERTIES SKIP_RETURN_CODE 77) endmacro() ### diff --git a/test/decoupled/2p2c/test_adaptive2p2c2d.cc b/test/decoupled/2p2c/test_adaptive2p2c2d.cc index 8a31d69f7fcfce7364d1bbacffdfb4704d990dfa..ccdc51cabbb969e4a2c28d3b368f11c0dc950f4c 100644 --- a/test/decoupled/2p2c/test_adaptive2p2c2d.cc +++ b/test/decoupled/2p2c/test_adaptive2p2c2d.cc @@ -61,5 +61,6 @@ int main(int argc, char** argv) #else #warning ALUGrid needed for this test. std::cout << "ALUGrid needed for this test. Aborting." << std::endl; + return 77; #endif } diff --git a/test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh b/test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh index ed745faf181a4f2a137b6bd97f5c4082a3f3a377..a9eb8e7180363e64a4468e791da42098f4a8e484 100644 --- a/test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh +++ b/test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh @@ -28,6 +28,8 @@ #include <dune/grid/alugrid.hh> #elif HAVE_DUNE_ALUGRID #include <dune/alugrid/grid.hh> +#else +#include <dune/grid/yaspgrid.hh> #endif #include <dumux/io/cubegridcreator.hh> @@ -53,7 +55,11 @@ namespace Properties NEW_TYPE_TAG(Adaptive2p2c2d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams)); // Set the grid type +#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID SET_TYPE_PROP(Adaptive2p2c2d, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>); +#else +SET_TYPE_PROP(Adaptive2p2c2d, Grid, Dune::YaspGrid<2>); +#endif // set the GridCreator property SET_TYPE_PROP(Adaptive2p2c2d, GridCreator, CubeGridCreator<TypeTag>); diff --git a/test/decoupled/2p2c/test_adaptive2p2c3dproblem.hh b/test/decoupled/2p2c/test_adaptive2p2c3dproblem.hh index 39a6901d26a0916f475153b4459c9aedc808aac3..96d58a42e84a83e1db3699805f02d2f660bf6863 100644 --- a/test/decoupled/2p2c/test_adaptive2p2c3dproblem.hh +++ b/test/decoupled/2p2c/test_adaptive2p2c3dproblem.hh @@ -28,6 +28,8 @@ #include <dune/grid/alugrid.hh> #elif HAVE_DUNE_ALUGRID #include <dune/alugrid/grid.hh> +#else +#include <dune/grid/yaspgrid.hh> #endif #include <dumux/common/math.hh> @@ -51,7 +53,11 @@ namespace Properties NEW_TYPE_TAG(Adaptive2p2c3d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams, MPFAProperties)); // Set the grid type +#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID SET_TYPE_PROP(Adaptive2p2c3d, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>); +#else +SET_TYPE_PROP(Adaptive2p2c3d, Grid, Dune::YaspGrid<3>); +#endif // set the GridCreator property SET_TYPE_PROP(Adaptive2p2c3d, GridCreator, CubeGridCreator<TypeTag>);