|
1 | 1 | #!/bin/bash |
| 2 | +# =========================================================================== |
| 3 | +# ios-uitest-run.sh — CI (Azure DevOps) entry point that runs the SamplesApp |
| 4 | +# UI test suites against an iOS Simulator on a macOS hosted agent. |
| 5 | +# |
| 6 | +# What it does: |
| 7 | +# 1. Picks the NUnit test filter from $UITEST_SNAPSHOTS_ONLY / |
| 8 | +# $UITEST_AUTOMATED_GROUP (snapshot groups, automated groups 1-5, |
| 9 | +# RuntimeTests, Benchmarks). |
| 10 | +# 2. Waits for the target simulator runtime/device to exist and boots it. |
| 11 | +# 3. Installs the pre-built SamplesApp bundle on the simulator with `idb` |
| 12 | +# (Meta's iOS Development Bridge, https://github.com/facebook/idb): |
| 13 | +# `xcrun simctl install` was historically unreliable for this |
| 14 | +# (see microsoft/appcenter#2389), idb is the dependable path. |
| 15 | +# 4. Runs the tests through the NUnit console, transforms the results and |
| 16 | +# maintains the failed-tests re-run list for retry stages. |
| 17 | +# |
| 18 | +# Tooling / supply-chain notes (idb): |
| 19 | +# - `idb-companion` comes from Meta's Homebrew tap `facebook/fb` |
| 20 | +# (github.com/facebook/homebrew-fb). The formula pins the binary artifact |
| 21 | +# of facebook/idb release v1.1.8 together with its sha256, so what gets |
| 22 | +# installed is reproducible byte-for-byte; the tap itself has been |
| 23 | +# dormant since 2022. |
| 24 | +# - Newer Homebrew refuses formulas from third-party taps unless explicitly |
| 25 | +# trusted (`brew trust`) — see the install section below. |
| 26 | +# - `fb-idb` (the Python client) is installed from PyPI via pipx, pinned to |
| 27 | +# Python 3.12 (asyncio breakage under 3.14) but not version-pinned. |
| 28 | +# =========================================================================== |
2 | 29 | set -euo pipefail |
3 | 30 | IFS=$'\n\t' |
4 | 31 |
|
@@ -172,8 +199,21 @@ then |
172 | 199 | # formulae without an explicit trust, so trust facebook/fb and install the |
173 | 200 | # fully-qualified formula (a bare "idb-companion" now resolves to the wrong cask). |
174 | 201 | brew tap facebook/fb >/dev/null 2>&1 || true |
| 202 | +<<<<<<< HEAD |
175 | 203 | brew trust facebook/fb >/dev/null 2>&1 || true |
176 | 204 | brew list --versions idb-companion >/dev/null 2>&1 || brew install facebook/fb/idb-companion |
| 205 | +======= |
| 206 | + # Newer Homebrew on the runner images gates third-party taps: installing |
| 207 | + # idb-companion fails with "Refusing to load formula facebook/fb/idb-companion |
| 208 | + # from untrusted tap facebook/fb" unless explicitly trusted. Trust only the |
| 209 | + # formula we need (least privilege); fall back to tap-level trust for brew |
| 210 | + # versions that only support that form. Older brews have no `trust` command |
| 211 | + # at all — best effort, the install below still surfaces any real failure. |
| 212 | + brew trust --formula facebook/fb/idb-companion >/dev/null 2>&1 \ |
| 213 | + || brew trust facebook/fb >/dev/null 2>&1 \ |
| 214 | + || true |
| 215 | + brew list --versions idb-companion >/dev/null 2>&1 || brew install idb-companion |
| 216 | +>>>>>>> origin/master |
177 | 217 |
|
178 | 218 | # 3) Install fb-idb under Python 3.12 |
179 | 219 | pipx uninstall fb-idb >/dev/null 2>&1 || true |
|
0 commit comments