From c24c8bab137180ca408e2af0e4fd8cb8b8290c1c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 29 Apr 2026 01:24:50 +0100 Subject: [PATCH] test(parallels): prefer arm64 mingit downloads --- scripts/e2e/parallels-windows-smoke.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/scripts/e2e/parallels-windows-smoke.sh b/scripts/e2e/parallels-windows-smoke.sh index ddd56da0377..9beaae98033 100644 --- a/scripts/e2e/parallels-windows-smoke.sh +++ b/scripts/e2e/parallels-windows-smoke.sh @@ -1029,11 +1029,24 @@ for wanted in preferred_names: break if best is None: + candidates = [] for asset in assets: name = asset.get("name", "") - if name.startswith("MinGit-") and name.endswith(".zip") and "busybox" not in name: - best = asset - break + if not (name.startswith("MinGit-") and name.endswith(".zip")): + continue + if "busybox" in name: + continue + if "-arm64." in name: + rank = 0 + elif "-64-bit." in name: + rank = 1 + elif "-32-bit." in name: + rank = 2 + else: + rank = 3 + candidates.append((rank, name, asset)) + if candidates: + best = sorted(candidates, key=lambda item: (item[0], item[1]))[0][2] if best is None: raise SystemExit("no MinGit asset found") @@ -1137,7 +1150,7 @@ ensure_mingit_zip() { MINGIT_ZIP_PATH="$MAIN_TGZ_DIR/$mingit_name" if [[ ! -f "$MINGIT_ZIP_PATH" ]]; then say "Download $MINGIT_ZIP_NAME" - curl -fsSL "$mingit_url" -o "$MINGIT_ZIP_PATH" + curl --retry 5 --retry-delay 3 --retry-all-errors -fsSL "$mingit_url" -o "$MINGIT_ZIP_PATH" fi }