From: Maxin B. John Date: Mon, 18 Mar 2013 10:35:06 +0000 (+0100) Subject: tests: relax check_prog to allow timeout command provided by busybox X-Git-Tag: v4.8~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=066a733bc079cdf17b07aa13f8ad0ac521aba30f;p=strace tests: relax check_prog to allow timeout command provided by busybox Busybox version of timeout doesn't have --version option. Relax check_prog to handle those cases. * tests/init.sh (check_prog): Use type builtin to check program availability. Signed-off-by: Maxin B. John --- diff --git a/tests/init.sh b/tests/init.sh index f860b0b0..a4b537ce 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -12,7 +12,7 @@ framework_skip_() { warn_ "$ME_: framework skip: $*"; exit 77; } check_prog() { - "$@" --version > /dev/null 2>&1 || + type "$@" > /dev/null 2>&1 || framework_skip_ "$* is not available" }