From patchwork Tue Nov 8 17:55:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: scripts/qemuimage-testlib: Output a slightly better error if expect is missing Date: Tue, 08 Nov 2011 17:55:50 -0000 From: Richard Purdie X-Patchwork-Id: 14527 Message-Id: <1320774950.10843.99.camel@ted> To: openembedded-core Signed-off-by: Richard Purdie --- diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib index 6a1b900..d0d1b74 100755 --- 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