Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/scripts/test_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ is_in_exec_path() {
echo "$1" | grep -qE '^(/bin/|/sbin/|/usr/bin/|/usr/sbin/|/usr/libexec/)'
}

# Don't check deeply-nested libraries that might be there only for internal use
# Based on: strings /lib/ld-musl-*.so.1 | grep -E '(/lib|/usr/lib)'
is_in_lib_path() {
echo "$1" | grep -qE '^(/lib/|/usr/lib/)'
echo "$1" | grep -qE '^(/lib|/usr/local/lib|/usr/lib)/[^/]+$'
}

is_apk() {
Expand Down Expand Up @@ -94,6 +96,15 @@ check_exec() {
done

status_warn "Version check ($file)"

# Show part of last command's output to help with debugging
if [ -z "$output" ]; then
warn 'No output to show'
else
warn 'First 10 lines of the last output:'
echo "$output" | head -n 10 | sed 's/^/ /'
fi

return 2
}

Expand Down Expand Up @@ -359,6 +370,11 @@ for PKG in /ci/*.[ai]pk; do
fi
done

# Clear package name for log output so as not to confused users with the final
# output.
PKG_NAME=
export PKG_NAME

echo
if [ "$RET" = 0 ]; then
success 'All tests passed'
Expand Down