From: Ruediger Meier Date: Wed, 14 May 2014 21:53:52 +0000 (+0200) Subject: tests: add function ts_check_prog X-Git-Tag: v2.25-rc1~128^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1962aaec688626220b5a4b8272c2cbe019478cb;p=thirdparty%2Futil-linux.git tests: add function ts_check_prog Signed-off-by: Ruediger Meier --- diff --git a/tests/functions.sh b/tests/functions.sh index 3888f0dcd0..66dcb0d706 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -45,6 +45,11 @@ function ts_check_test_command { fi } +function ts_check_prog { + local cmd=$1 + type "$cmd" >/dev/null 2>&1 || ts_skip "missing in PATH: $cmd" +} + function ts_check_losetup { local tmp ts_check_test_command "$TS_CMD_LOSETUP"