aboutsummaryrefslogtreecommitdiff
path: root/all.bash
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-21 10:55:50 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-21 10:55:50 +0200
commitecfee43efbad422a20b2aaddff0a3b428e775eb0 (patch)
treea49250ff7f74ebe4630e9b5c725c2a40e8da3ba0 /all.bash
parent2e974c072517b57d0f3882a1f90b97f1fc8f8f9c (diff)
downloadffwd-ecfee43efbad422a20b2aaddff0a3b428e775eb0.tar.gz
ffwd-ecfee43efbad422a20b2aaddff0a3b428e775eb0.zip
build: fix checks aggregate under bash 3.2 (empty array + set -u)
Diffstat (limited to 'all.bash')
-rwxr-xr-xall.bash14
1 files changed, 9 insertions, 5 deletions
diff --git a/all.bash b/all.bash
index 84975a6..445e8c9 100755
--- a/all.bash
+++ b/all.bash
@@ -147,9 +147,6 @@ USAGE
# Any failing step aborts the suite with a non-zero exit, as the old script did.
_step() { "$@" || { err "checks: step failed -> $*"; exit 1; }; }
- local long_args=()
- (( long )) && long_args=(--long)
-
# Model-free: build, hermetic C tests, kernel goldens, hermetic tokenizers.
(( skip_hermetic )) || _step run make test
(( skip_build )) || _step run make cpu
@@ -162,8 +159,15 @@ USAGE
# CPU model checks (need a model directory).
if [[ -n "$model_dir" ]]; then
_step check_workspace_api --model-dir "$model_dir"
- _step check_batch_parity --model-dir "$model_dir" --backend cpu \
- --batch-size "$batch_size" "${long_args[@]}"
+ # An empty array under `set -u` errors on bash 3.2 (macOS default), so pass
+ # --long with an explicit branch rather than expanding a maybe-empty array.
+ if (( long )); then
+ _step check_batch_parity --model-dir "$model_dir" --backend cpu \
+ --batch-size "$batch_size" --long
+ else
+ _step check_batch_parity --model-dir "$model_dir" --backend cpu \
+ --batch-size "$batch_size"
+ fi
if [[ -n "$context_model_dir" ]]; then
_step check_contextual_batch_parity --model-dir "$context_model_dir" \
--backend cpu --runs "$context_runs"