mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user