summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-08-20 18:30:45 +0700
committerhathach <[email protected]>2026-08-20 18:30:45 +0700
commit0fa0ece024fecae0847459b5949c66f40fcc6e11 (patch)
treed1cc160b3a0c34c96869a407c86e0e080c373bf1 /test
parent208ce50e0d5c08eead9c854d73fd397748e1413e (diff)
hil: address Copilot review — loud extraction markers, exit-visible variant warnings
The workflow-logic harness slices hil-validate.js between marker strings (the body is not a module; the runtime wraps it, so markers are the only handle). A renamed marker used to produce a garbage slice and a confusing ReferenceError; it now fails naming the missing marker, proven by mutating the marker and watching the message. The variant-warning loop in hil_ci.sh read variant_names through a process substitution -- the exact exit-status blindness the comment in resolve_build_dirs warns about, two functions earlier in the same file. A plain command-substitution assignment is visible to set -e, so a malformed roster now aborts instead of silently skipping the warnings.
Diffstat (limited to 'test')
-rw-r--r--test/hil/hil_ci.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/hil/hil_ci.sh b/test/hil/hil_ci.sh
index f474c3055..66f4e48d4 100644
--- a/test/hil/hil_ci.sh
+++ b/test/hil/hil_ci.sh
@@ -163,12 +163,15 @@ for b in ${BOARDS[@]+"${BOARDS[@]}"}; do
# variant-suffixed, so this is the normal state for e.g. the -DMA variants. It is worth
# saying out loud: hil_test.py logs `Skip (no binary)` and counts zero errors for it, so
# the run exits 0 and the operator reads a green table for cells that never ran.
+ # plain assignment, not process substitution: set -e sees a variant_names failure here,
+ # the same trap the comment in resolve_build_dirs warns about
+ vnames=$(variant_names "$b")
while IFS= read -r v; do
[ -z "$v" ] && continue
# whole lines: a substring match lets cmake-build-<v>-DMA silence the warning for <v>
grep -qxF -- "$ROOT_DIR/examples/cmake-build-$v" <<< "$dirs" \
|| echo "warning: $b variant '$v' has no build dir -- its cells will be skipped, not tested" >&2
- done < <(variant_names "$b")
+ done <<< "$vnames"
fi
done
if [ ${#missing[@]} -gt 0 ]; then