Files
packages/admin/sudo/test.sh
Alexandru Ardelean 8c8875c1f6 sudo: add test-version.sh and stop running sudo in tests
PKG_VERSION substitutes p->_p (1.9.17_p2) for a valid apk version, but the
binaries print the real 1.9.17p2, so the generic per-executable version
probe reports "no executables provided version" and fails. Add a
test-version.sh that matches the version string compiled into the binary.

Executing sudo under QEMU emulation (e.g. mips_24kc) hangs indefinitely, so
neither test-version.sh nor test.sh runs it any more: the version is read
from the binary and test.sh only checks the installed files.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-08-10 20:17:56 +03:00

13 lines
473 B
Bash
Executable File

#!/bin/sh
# sudo hangs when executed under QEMU emulation (e.g. mips_24kc), so verify the
# installed files rather than running it. The version is checked in
# test-version.sh against the string compiled into the binary.
case "$1" in
sudo)
[ -x /usr/bin/sudo ] || { echo "FAIL: /usr/bin/sudo missing"; exit 1; }
[ -x /usr/sbin/visudo ] || { echo "FAIL: /usr/sbin/visudo missing"; exit 1; }
[ -f /etc/sudoers ] || { echo "FAIL: /etc/sudoers missing"; exit 1; }
;;
esac