Skip to content

Commit 40d20c6

Browse files
fix: retry ios
1 parent 0435cc1 commit 40d20c6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.maestro/scripts/run-tests.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ run_maestro_with_targets() {
234234
# Global flags (--device, --driver, --env, tags) come before `test`.
235235
if [[ "$OSTYPE" == darwin* ]]; then
236236
# shellcheck disable=SC2086
237-
script -q /dev/null "$MAESTRO_BIN" --platform "$PLATFORM" --device "$DEVICE_ID" $DRIVER_ARGS $EXTRA "$@" test $test_targets 2>&1 | tee "$tmp"
237+
script -q /dev/null "$MAESTRO_BIN" --platform "$PLATFORM" --device "$DEVICE_ID" $DRIVER_ARGS $EXTRA "$@" test $test_targets < /dev/null 2>&1 | tee "$tmp"
238238
else
239239
local cmd
240240
# shellcheck disable=SC2086
241241
cmd=$(printf '%q ' "$MAESTRO_BIN" --platform "$PLATFORM" --device "$DEVICE_ID" $DRIVER_ARGS $EXTRA "$@" test $test_targets)
242-
script -qec "$cmd" /dev/null 2>&1 | tee "$tmp"
242+
script -qec "$cmd" /dev/null < /dev/null 2>&1 | tee "$tmp"
243243
fi
244244
rc=${PIPESTATUS[0]}
245245

@@ -294,12 +294,14 @@ run_maestro() {
294294
fi
295295

296296
if is_ci; then
297+
local -a flows=()
298+
mapfile -t flows < <(collect_flow_files)
297299
local flow failed=0
298-
while IFS= read -r flow; do
300+
for flow in "${flows[@]}"; do
299301
[ -z "$flow" ] && continue
300302
echo "=== Running flow: $flow ==="
301303
run_maestro_with_targets "$(maestro_test_paths "$flow")" "${tag_args[@]}" || failed=1
302-
done < <(collect_flow_files)
304+
done
303305
return "$failed"
304306
fi
305307

0 commit comments

Comments
 (0)