Skip to content
Snippets Groups Projects
Commit eebb4f95 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

add support for optional arguments

parent 2520d3a2
No related branches found
No related tags found
1 merge request!16MPI operators
Pipeline #19969 failed
......@@ -56,9 +56,9 @@ DO_TESTS=${DO_TESTS:-true}
DO_EXAMPLES=${DO_EXAMPLES:-true}
DO_LONG_TESTS=${DO_LONG_TESTS:-false}
TEST_OPTIONS=''
COMMON_TEST_OPTIONS=''
TEST_DIR="$HYSOP_DIR"
EXAMPLE_OPTIONS='-cp default -maxit 2'
COMMON_EXAMPLE_OPTIONS='-cp default -maxit 2'
EXAMPLE_DIR="$HYSOP_DIR/../examples"
hysop_test() {
......@@ -66,7 +66,7 @@ hysop_test() {
echo
echo "TESTING $1"
echo "========$(printf '=%.0s' `seq ${#1}`)"
python2 "${TEST_DIR}/${1}" ${TEST_OPTIONS}
python2 "${TEST_DIR}/${1}" ${@:2} ${COMMON_TEST_OPTIONS}
echo
}
example_test() {
......@@ -74,7 +74,7 @@ example_test() {
echo
echo "EXAMPLE $1"
echo "========$(printf '=%.0s' `seq ${#1}`)"
python2 "${EXAMPLE_DIR}/${1}" ${EXAMPLE_OPTIONS}
python2 "${EXAMPLE_DIR}/${1}" ${@:2} ${COMMON_EXAMPLE_OPTIONS}
echo
}
......@@ -113,8 +113,8 @@ if [ "$DO_EXAMPLES" = true ]; then
example_test "scalar_advection/scalar_advection.py"
example_test "multiresolution/scalar_advection.py"
example_test "shear_layer/shear_layer.py"
example_test "taylor_green/taylor_green.py" -impl python
example_test "taylor_green/taylor_green.py" -impl opencl
example_test "taylor_green/taylor_green.py" '-impl python'
example_test "taylor_green/taylor_green.py" '-impl opencl'
example_test "bubble/periodic_bubble.py"
example_test "bubble/periodic_bubble_levelset.py"
example_test "bubble/periodic_bubble_levelset_penalization.py"
......
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