improve smoke test

Related: #2182490
This commit is contained in:
Miroslav Lichvar 2023-08-08 10:19:40 +02:00
parent 72a63b1211
commit 0eee71f55d

View File

@ -1,9 +1,27 @@
#!/bin/bash
set -ex
set -e
for b in gpsd gpscat gpspipe cgps gpsfake ubxtool; do
$b --help |& grep -i ^usage:
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 0
exit $r