From bfbbb420c0a6b315f73d3d5e463a518098ca6ef0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Nov 2011 17:55:50 +0000 Subject: scripts/qemuimage-testlib: Output a slightly better error if expect is missing Signed-off-by: Richard Purdie --- scripts/qemuimage-testlib | 14 ++++++++++++++ 1 file changed, 14 insertions(+) mode change 100644 => 100755 scripts/qemuimage-testlib (limited to 'scripts/qemuimage-testlib') diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib old mode 100644 new mode 100755 index 6a1b9002a4..d0d1b74196 --- a/scripts/qemuimage-testlib +++ b/scripts/qemuimage-testlib @@ -96,6 +96,13 @@ expect { eof { exit [ lindex [wait] 3 ] } } EOF` + + expect=`which expect` + if [ ! -x "$expect" ]; then + Test_Error "ERROR: Please install expect" + return 1 + fi + expect -c "$exp_cmd" ret=$? rm -rf $tmpfile @@ -120,6 +127,13 @@ expect { eof { exit [ lindex [wait] 3 ] } } EOF` + + expect=`which expect` + if [ ! -x "$expect" ]; then + Test_Error "ERROR: Please install expect" + return 1 + fi + expect -c "$exp_cmd" ret=$? rm -rf $tmpfile -- cgit 1.2.3-korg