Skip to content
Snippets Groups Projects
Commit 9a0b32eb authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CTest] Honour return 77 as skipped test.

Adjust runTest.sh to pass-through the return code.
Adapt tests in test/decoupled/2p2c to reflect this behaviour.


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13897 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 83bc14e0
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,16 @@ if ! test -r "$REFERENCE_RESULT"; then ...@@ -35,14 +35,16 @@ if ! test -r "$REFERENCE_RESULT"; then
usage usage
exit 1 exit 1
fi fi
#run the test #run the test
echo "######################" echo "######################"
echo "# Running test" echo "# Running test"
echo "######################" echo "######################"
if ! $TEST_BINARY $TEST_ARGS; then $TEST_BINARY $TEST_ARGS
echo "Executing the binary failed!" RETURN_CODE_TEST_BINARY=$?
exit 1 if test "$RETURN_CODE_TEST_BINARY" != "0"; then
echo "Return code: $RETURN_CODE_TEST_BINARY"
exit $RETURN_CODE_TEST_BINARY
fi fi
# compare the results # compare the results
......
...@@ -59,6 +59,9 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour ...@@ -59,6 +59,9 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour
# add test # add test
add_test(${dumux_test} ${dumux_test_args}) add_test(${dumux_test} ${dumux_test_args})
add_dependencies(${_test_target} ${dumux_test_executable}) 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() endmacro()
### ###
......
...@@ -61,5 +61,6 @@ int main(int argc, char** argv) ...@@ -61,5 +61,6 @@ int main(int argc, char** argv)
#else #else
#warning ALUGrid needed for this test. #warning ALUGrid needed for this test.
std::cout << "ALUGrid needed for this test. Aborting." << std::endl; std::cout << "ALUGrid needed for this test. Aborting." << std::endl;
return 77;
#endif #endif
} }
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <dune/grid/alugrid.hh> #include <dune/grid/alugrid.hh>
#elif HAVE_DUNE_ALUGRID #elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh> #include <dune/alugrid/grid.hh>
#else
#include <dune/grid/yaspgrid.hh>
#endif #endif
#include <dumux/io/cubegridcreator.hh> #include <dumux/io/cubegridcreator.hh>
...@@ -53,7 +55,11 @@ namespace Properties ...@@ -53,7 +55,11 @@ namespace Properties
NEW_TYPE_TAG(Adaptive2p2c2d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams)); NEW_TYPE_TAG(Adaptive2p2c2d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams));
// Set the grid type // Set the grid type
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
SET_TYPE_PROP(Adaptive2p2c2d, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>); 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 the GridCreator property
SET_TYPE_PROP(Adaptive2p2c2d, GridCreator, CubeGridCreator<TypeTag>); SET_TYPE_PROP(Adaptive2p2c2d, GridCreator, CubeGridCreator<TypeTag>);
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <dune/grid/alugrid.hh> #include <dune/grid/alugrid.hh>
#elif HAVE_DUNE_ALUGRID #elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh> #include <dune/alugrid/grid.hh>
#else
#include <dune/grid/yaspgrid.hh>
#endif #endif
#include <dumux/common/math.hh> #include <dumux/common/math.hh>
...@@ -51,7 +53,11 @@ namespace Properties ...@@ -51,7 +53,11 @@ namespace Properties
NEW_TYPE_TAG(Adaptive2p2c3d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams, MPFAProperties)); NEW_TYPE_TAG(Adaptive2p2c3d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams, MPFAProperties));
// Set the grid type // Set the grid type
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
SET_TYPE_PROP(Adaptive2p2c3d, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>); 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 the GridCreator property
SET_TYPE_PROP(Adaptive2p2c3d, GridCreator, CubeGridCreator<TypeTag>); SET_TYPE_PROP(Adaptive2p2c3d, GridCreator, CubeGridCreator<TypeTag>);
......
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