From aeff0b9bf71d87aabfec1f31ecbf6fd6eff2dfc8 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Sun, 21 Jun 2026 12:55:59 +0200 Subject: devtools: fix container-build-test.sh (python3 dep, clean-tree abort) --- devtools/container-build-test.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/devtools/container-build-test.sh b/devtools/container-build-test.sh index 4dcc627..d2fecc8 100755 --- a/devtools/container-build-test.sh +++ b/devtools/container-build-test.sh @@ -16,9 +16,12 @@ run_in_container() { echo "==================== apt bootstrap ====================" apt-get update -qq + # python3 is a build dependency, not just tooling: the shared library's + # export map (ffwd.map) is generated at build time by devtools/gen_exports.py + # (see libffwd/Makefile), so `make cpu` fails without it. apt-get install -y --no-install-recommends \ build-essential ca-certificates libcjson-dev libopenblas-dev \ - pkg-config git >/dev/null + pkg-config git python3 >/dev/null echo "==================== system / toolchain ====================" uname -a @@ -53,7 +56,14 @@ run_in_container() { else echo "==================== make clean ====================" make clean - residual=$(ls -d build ffwd-cli ffwd-server 2>/dev/null | wc -l | tr -d ' ') + # Count leftover artifacts with a per-path test, not `ls -d a b c`: when + # clean succeeds and none exist, ls exits non-zero, which under + # `set -e -o pipefail` would abort the run exactly when cleanup worked. + # (bash 5 aborts here; macOS bash 3.2 does not - it hid this.) + residual=0 + for f in build ffwd-cli ffwd-server; do + if [ -e "$f" ]; then residual=$((residual + 1)); fi + done echo "residual build artifacts: $residual (want 0)" fi -- cgit v1.3.1