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 merge requests found
......@@ -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
......
......@@ -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()
###
......
......@@ -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
}
......@@ -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>);
......
......@@ -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>);
......
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