From 2dc083f436cf611f743440982cd45c3080868ba5 Mon Sep 17 00:00:00 2001 From: David Given Date: Sat, 26 Nov 2016 12:53:36 +0100 Subject: [PATCH] Use command -v rather than hash to detect commands (command is Posix and works on OpenBSD). --- tests/plat/testdriver.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/plat/testdriver.sh b/tests/plat/testdriver.sh index f5ca187a3..1c57ee163 100755 --- a/tests/plat/testdriver.sh +++ b/tests/plat/testdriver.sh @@ -15,7 +15,7 @@ trap "rm -f $pidfile" EXIT case $method in qemu-system-*) - if ! hash $method 2>/dev/null; then + if ! command -v $method 2>/dev/null; then echo "Warning: $method not installed, skipping test" exit 0 fi @@ -33,7 +33,7 @@ case $method in ;; qemu-*) - if ! hash $method 2>/dev/null; then + if ! command -v $method 2>/dev/null; then echo "Warning: $method not installed, skipping test" exit 0 fi @@ -48,4 +48,4 @@ case $method in esac ( grep -q @@FAIL $result || ! grep -q @@FINISHED $result ) && cat $result && exit 1 -exit 0 \ No newline at end of file +exit 0