]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/qemuimage-testlib: Output a slightly better error if expect is missing
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Nov 2011 17:55:50 +0000 (17:55 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Nov 2011 11:35:31 +0000 (11:35 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/qemuimage-testlib [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 6a1b900..d0d1b74
@@ -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