[CI] replace shellcheck script with shellcheck-py hook (#52572)

Signed-off-by: Turner <doubleujabbour@gmail.com>
Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Turner Jabbour
2026-08-20 10:09:59 +00:00
committed by GitHub
co-authored by Claude Sonnet 5
parent 5b1e7a812b
commit 1eab6fef01
20 changed files with 204 additions and 197 deletions
@@ -43,6 +43,7 @@ run_wrapper() {
_env="$_env $1"; shift
done
shift
# shellcheck disable=SC2086 # word splitting is intentional: $_env holds multiple NAME=value assignments
env -i PATH="$WORKDIR/bin:/usr/bin:/bin" $_env "$WRAPPER" "$@" > "$_out"
}
@@ -140,9 +141,8 @@ fake_passwd="$WORKDIR/fake-passwd-prepopulated"
printf 'vllm:x:%s:%s:vllm:/home/vllm:/bin/bash\n' "$current_uid" "$current_gid" > "$fake_passwd"
out="$WORKDIR/case6.out"
run_wrapper "$out" "HOME=$case5_home" "VLLM_PASSWD_FILE=$fake_passwd" -- --model foo
line_count="$(wc -l < "$fake_passwd")"
# NOTE: wc may count 0 or 1 depending on trailing newline; accept 1.
# More robust: count lines matching our UID.
# wc may count 0 or 1 depending on trailing newline, so count lines
# matching our UID instead for a robust check.
uid_lines="$(grep -c ":${current_uid}:" "$fake_passwd" || true)"
[ "$uid_lines" = "1" ] \
|| { echo "FAIL: case6: expected exactly one entry for UID $current_uid, got $uid_lines"; cat "$fake_passwd"; exit 1; }