mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 03:47:10 +04:00
mpd: match the version in the binary for the CI tests
mpd 0.24 aborts in main() when /proc/self/status reports more than one thread, before it even parses the command line (src/Main.cxx). qemu-user always reports several, so "mpd --version" cannot run on the emulated CI targets and the generic version check fails there. Add test-version.sh matching the version string compiled into the binary, and drop the two unusable "mpd --version" calls from test.sh, whose failures it silently ignored anyway. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
1 parent
bcaee80190
commit
3242c61757
2 files changed
+22
-6
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck shell=busybox
|
||||
|
||||
# mpd 0.24 refuses to start when /proc/self/status reports more than one
|
||||
# thread before main() runs, which it does under qemu-user, so the binary
|
||||
# cannot be asked for its version on the emulated CI targets. Match the
|
||||
# version string compiled into it instead.
|
||||
case "$1" in
|
||||
mpd-full | mpd-mini)
|
||||
grep -aqF "$2" /usr/bin/mpd
|
||||
;;
|
||||
mpd-avahi-service)
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Untested package: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
+2
-6
@@ -1,12 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
_mpd_test() {
|
||||
# Version check
|
||||
mpd --version | grep -F "$2"
|
||||
|
||||
# Confirm the binary reports at least one supported output plugin;
|
||||
# "null" is always compiled in and safe for testing.
|
||||
mpd --version | grep -i "null"
|
||||
# Running mpd is not possible on the emulated CI targets, see
|
||||
# test-version.sh; only the init script's shell logic is tested here.
|
||||
|
||||
# Test playlist_directory parsing logic from the init script:
|
||||
# explicit value
|
||||
|
||||
Reference in new issue
Block a user