From 0eee71f55d94ab7b7da74697784c3d82b4f14477 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 8 Aug 2023 10:19:40 +0200 Subject: [PATCH] improve smoke test Related: #2182490 --- tests/smoke/runtest.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh index 6a5ba2f..2ad061b 100755 --- a/tests/smoke/runtest.sh +++ b/tests/smoke/runtest.sh @@ -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