sane-backends: add test-version.sh

saned has no version option, so the generic runtime test finds no
executable in sane-daemon that reports the package version and fails:

  sane-daemon: No executables in the package provided version 1.4.0

This shows up in any PR whose CI installs sane-daemon, for example
through hplip-sane. With an override script the check applies to every
package built from sane-backends, so check sane-config's version for
sane-frontends and skip the packages that have no executable reporting
one: sane-daemon, libsane, the backend modules and the meta packages.

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
This commit is contained in:
Sander van Deijck authored and Hannu Nyman committed 2026-11-01 08:58:24 +02:00
1 parent 0d5f51b58e
commit e2f4367e1f
1 file changed
+23
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
# shellcheck shell=busybox
case "$PKG_NAME" in
sane-frontends)
sane-config --version | grep -F "$PKG_VERSION"
;;
sane-daemon)
# saned has no version option; it only prints its usage, so there is
# nothing to check. The version is covered by sane-frontends.
exit 0
;;
libsane | sane-backends | sane-backends-all | sane-*)
# The library, the backend modules and the meta packages contain no
# executables that report a version.
exit 0
;;
*)
echo "Untested package: $PKG_NAME" >&2
exit 1
;;
esac