test: skip defconfig backup files at find time, not mid-loop

defconfig.sh used $# (find result, incl. *~ / *.bak) for the TAP total
but then 'continue'd past backups without decrementing — so a stray
bpi_r4_*_defconfig~ in the tree made TAP see "1..23" followed by only 21
results, and the harness treated the missing 2 as failures.  Filter the
patterns at find instead; $# now matches what the loop iterates over

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-06-07 20:50:29 +02:00
parent ffe5ed1e32
commit f0dfc6a8de
+4 -7
View File
@@ -31,12 +31,6 @@ check()
echo "1..$total"
for defconfig in "$@"; do
# Skip UNIX backup files
case "$defconfig" in
*~|*.bak|'#'*'#'|.#*)
continue
;;
esac
base=$(basename "$defconfig")
if whitelist "$base"; then
echo "ok $num - $base is exempted # skip"
@@ -50,6 +44,9 @@ check()
}
# shellcheck disable=SC2046
check $(find "$CONFIGS" -maxdepth 1 -type f | LC_ALL=C sort) || exit 1
check $(find "$CONFIGS" -maxdepth 1 -type f \
! -name '*~' ! -name '*.bak' \
! -name '#*#' ! -name '.#*' \
| LC_ALL=C sort) || exit 1
exit 0