]> granicus.if.org Git - strace/commitdiff
tests: relax check_prog to allow timeout command provided by busybox
authorMaxin B. John <maxin.john@enea.com>
Mon, 18 Mar 2013 10:35:06 +0000 (11:35 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 18 Mar 2013 22:17:41 +0000 (22:17 +0000)
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 <maxin.john@enea.com>
tests/init.sh

index f860b0b079470934619f799e79586f80e6e59fc3..a4b537ce48e9a8cbdc22456c42a08ce491330b5e 100644 (file)
@@ -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"
 }