Skip to content

Commit 65d65a0

Browse files
committed
Let a host that needs no launcher run its own smoke test
Every macOS leg of the executor has been dying since the Rosetta gate landed, after a complete and valid build: the SDK is finalized, the static validation passes, the toolchain contract passes, and then build-host.sh exits with `run[@]: unbound variable` and stages nothing. The upload finds an empty out/ and the Intel host, which needs the arm64 SDK to cross from, fails behind it. arm64-apple-darwin is a required host, so no snapshot could publish at all. The launcher prefix is an array that is empty for every host that runs its own binaries -- as the comment above it says -- and macOS's /bin/bash is 3.2, where expanding an empty array under `set -u` is an error rather than nothing: $ /bin/bash -c 'set -u; run=(); "${run[@]}" echo hola' /bin/bash: run[@]: unbound variable $ /bin/bash -c 'set -u; run=(); ${run[@]+"${run[@]}"} echo hola' hola build_and_stage() already carries the tolerant form, and the reason for it, three lines below.
1 parent a75f246 commit 65d65a0

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

scripts/ci/build-host.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,15 @@ smoke_test_bootstrap() {
157157
local -a run=(${2:-})
158158
digest=$(awk '{print $1}' "$bootstrap_archive.sha256")
159159
install_root="$PWD/bootstrap-installed"
160+
# ${run[@]+...}: macOS's /bin/bash is 3.2, where expanding an empty array
161+
# under set -u is an unbound-variable error -- and empty is the normal
162+
# case here, for every host that runs its own binaries.
160163
VITASDK_BOOTSTRAP_ARCHIVE="$bootstrap_archive" VITASDK_BOOTSTRAP_SHA256="$digest" \
161-
"${run[@]}" build/vitasdk/share/vdpm/bootstrap-vitasdk.sh --install-dir "$install_root"
162-
VITASDK="$install_root" "${run[@]}" "$install_root/bin/vdpm" --help >/dev/null
164+
${run[@]+"${run[@]}"} build/vitasdk/share/vdpm/bootstrap-vitasdk.sh --install-dir "$install_root"
165+
VITASDK="$install_root" ${run[@]+"${run[@]}"} "$install_root/bin/vdpm" --help >/dev/null
163166
# vdpm ships pacman under libexec/vdpm, not bin/.
164-
"${run[@]}" "$install_root/libexec/vdpm/pacman" --version >/dev/null
165-
"${run[@]}" "$install_root/bin/arm-vita-eabi-gcc" --version
167+
${run[@]+"${run[@]}"} "$install_root/libexec/vdpm/pacman" --version >/dev/null
168+
${run[@]+"${run[@]}"} "$install_root/bin/arm-vita-eabi-gcc" --version
166169
}
167170

168171
# Builds against $stage1_dir if set, then stages outputs plus provenance.

0 commit comments

Comments
 (0)