[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not ins
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not installed |
Date: |
Tue, 18 Nov 2014 10:49:46 +0800 |
When which(1) is not installed, we complain "perl not found" because
it's the first set_prog_path check. The error message is misleading.
Fix it by adding a check for which(1) in the beginning.
Signed-off-by: Fam Zheng <address@hidden>
---
tests/qemu-iotests/common.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index bd6790b..9674f3a 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -73,6 +73,8 @@ _fatal()
exit 1
}
+which -v &>/dev/null || _fatal "which not found"
+
export PERL_PROG="`set_prog_path perl`"
[ "$PERL_PROG" = "" ] && _fatal "perl not found"
--
1.9.3
- [Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not installed,
Fam Zheng <=