From fbf1c05fc7aa50446100e32c1e95076a98b7e42f Mon Sep 17 00:00:00 2001 From: Evgeny Malygin Date: Wed, 10 Jul 2024 22:02:53 +0300 Subject: [PATCH] ITs: fix run-tests script (#354) Signed-off-by: Evgeny Malygin --- src/integration-tests/run-tests | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/integration-tests/run-tests b/src/integration-tests/run-tests index 6bc10b86e..cd6546938 100755 --- a/src/integration-tests/run-tests +++ b/src/integration-tests/run-tests @@ -19,8 +19,9 @@ set -e PRESET="legacy_mode or fsm_mode" -if [ -n "$1" ]; then - PRESET="$1" +if [[ -n "$1" ]] && ! [[ "$1" == -* ]]; then + PRESET=$1 + shift echo "Use IT preset '$PRESET' from the script argument" elif [ -n "$BLAZINGMQ_IT_PRESET" ]; then PRESET=$BLAZINGMQ_IT_PRESET @@ -35,4 +36,4 @@ repo_dir=${repo_dir%/src/*} export PYTHONPATH=$repo_dir/src/python:$PYTHONPATH cd "$repo_dir/src/integration-tests" -python3 -m pytest -m "$PRESET" "${@: 2}" +python3 -m pytest -m "$PRESET" "$@"