Skip to content

Commit

Permalink
Fix positional argument parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
skywhale committed Apr 18, 2024
1 parent 0fb5dec commit 8c098f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-tests/run-docker-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ while [[ $# -gt 0 ]]; do
;;
*)
TEST_FILTER+=("$1")
shift
;;
esac
done

Expand Down Expand Up @@ -200,9 +202,7 @@ test_simultaneous_redemption() {
# Run tests (functions prefixed with test_) in alphabetical order.
# Optional filter provided by positional arguments is applied.
for func in $(declare -F | awk '{print $3}'); do
echo '-'$func
if [[ "$func" =~ ^test_ ]]; then
echo '='$func
if [ ${#TEST_FILTER[@]} -eq 0 ] || [[ "${TEST_FILTER[*]}" =~ "$func" ]]; then
$func
fi
Expand Down

0 comments on commit 8c098f5

Please sign in to comment.