Skip to content

Commit 161cfa9

Browse files
committed
test(e2e): hold 313 to bash 3.2, which is what macOS ships
It failed on its first CI run with `mapfile: command not found`. That constraint was already written down -- 47_cdb_prebuilt_module_path_abs.sh says it in its own comment -- and every other user of `mapfile` in this suite declares `# requires: gcc`, which macOS never satisfies. The rule existed and the tests that could break it could not reach the platform that would tell them. Which is the same finding this file was added for, one level up: the build and run assertions above the failure had already PASSED on macOS, so the mechanism itself works there. Only the test did not.
1 parent e8f651f commit 161cfa9

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

tests/e2e/313_check_stamp_on_every_platform.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,18 @@ out="$("$MCPP" run 2>&1 | tail -1)"
6767
# declared output goes unproduced -- it leaves the file absent and re-runs that
6868
# edge on every build afterwards, so a build with no stamp mechanism at all
6969
# stays green and merely redoes work.
70-
mapfile -t stamps < <(find target -name 'probe.stamp')
71-
(( ${#stamps[@]} == 1 )) || {
72-
printf ' %s\n' "${stamps[@]}"
73-
echo "FAIL: expected exactly one stamp written by the engine, found ${#stamps[@]}"
74-
exit 1; }
70+
# ⚠️ NOT `mapfile`. macOS ships bash 3.2, which does not have it, and this file
71+
# runs there — `47_cdb_prebuilt_module_path_abs.sh` already says so in its own
72+
# comment, and every other user of `mapfile` in this suite declares
73+
# `# requires: gcc`, which macOS never satisfies. So the constraint was written
74+
# down and the tests that could violate it could not reach macOS to find out.
75+
# This one did, on its first CI run, with `mapfile: command not found`.
76+
stamp_count=$(find target -name 'probe.stamp' | wc -l | tr -d '[:space:]')
77+
if [ "$stamp_count" != "1" ]; then
78+
find target -name 'probe.stamp' | sed 's/^/ /'
79+
echo "FAIL: expected exactly one stamp written by the engine, found $stamp_count"
80+
exit 1
81+
fi
7582

7683
# And the other half: a satisfied edge is not re-run. Without the stamp this
7784
# would repeat forever, which is the symptom the exit code hides.

0 commit comments

Comments
 (0)