Skip to content

Commit

Permalink
fix filtering arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
lmuntaner committed Oct 22, 2024
1 parent aff24a3 commit 20a2520
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/test-canisters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ fi

# Parse arguments for --no-build flag
NO_BUILD=false
for arg in "$@"; do
if [ "$arg" == "--no-build" ]; then
args=("$@")
filtered_args=()
for arg in "${args[@]}"; do
if [ "$arg" != "--no-build" ]; then
filtered_args+=("$arg")
else
NO_BUILD=true
# Remove --no-build from the argument list so it's not passed to cargo test
set -- "${@/--no-build/}"
fi
done

Expand Down Expand Up @@ -68,4 +70,4 @@ fi
# Run tests

echo "Running integration tests."
cargo test "${@:-}"
cargo test "${filtered_args[@]}"

0 comments on commit 20a2520

Please sign in to comment.