gpsd-minimal/tests/smoke/runtest.sh
Miroslav Lichvar 0eee71f55d improve smoke test
Related: #2182490
2023-08-08 10:19:47 +02:00

28 lines
360 B
Bash
Executable File

#!/bin/bash
set -e
r=0
executables=$(rpm -ql gpsd-minimal gpsd-minimal-clients | grep -E '/s?bin/')
for b in $executables; do
case "$(basename "$b")" in
gpsdebuginfo)
continue;;
zerk)
h="-h";;
*)
h="--help";;
esac
if "$b" "$h" |& grep -qi '^usage *:'; then
echo "$b OK"
else
echo "$b FAILED"
"$b" "$h" || :
r=1
fi
done
exit $r