From eebb4f95add725a5d089453f3664923228027e91 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Keck <Jean-Baptiste.Keck@imag.fr> Date: Thu, 28 Feb 2019 14:13:11 +0100 Subject: [PATCH] add support for optional arguments --- ci/scripts/test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh index e2e23e89d..5be8eb401 100755 --- a/ci/scripts/test.sh +++ b/ci/scripts/test.sh @@ -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" -- GitLab