diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-08 17:55:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:51:17 +0000 |
commit | a3b987a2f72bf9406bef577523399b845b7ee970 (patch) | |
tree | e653bb90616a0505c67388897cacd5594551de00 /scripts | |
parent | b6bc04dfeb98971999218bb2987dc93e52979862 (diff) | |
download | poky-a3b987a2f72bf9406bef577523399b845b7ee970.tar.gz |
scripts/qemuimage-testlib: Output a slightly better error if expect is missing
(From OE-Core rev: bfbbb420c0a6b315f73d3d5e463a518098ca6ef0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/qemuimage-testlib | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib index 6a1b9002a4..d0d1b74196 100755 --- a/scripts/qemuimage-testlib +++ b/scripts/qemuimage-testlib | |||
@@ -96,6 +96,13 @@ expect { | |||
96 | eof { exit [ lindex [wait] 3 ] } | 96 | eof { exit [ lindex [wait] 3 ] } |
97 | } | 97 | } |
98 | EOF` | 98 | EOF` |
99 | |||
100 | expect=`which expect` | ||
101 | if [ ! -x "$expect" ]; then | ||
102 | Test_Error "ERROR: Please install expect" | ||
103 | return 1 | ||
104 | fi | ||
105 | |||
99 | expect -c "$exp_cmd" | 106 | expect -c "$exp_cmd" |
100 | ret=$? | 107 | ret=$? |
101 | rm -rf $tmpfile | 108 | rm -rf $tmpfile |
@@ -120,6 +127,13 @@ expect { | |||
120 | eof { exit [ lindex [wait] 3 ] } | 127 | eof { exit [ lindex [wait] 3 ] } |
121 | } | 128 | } |
122 | EOF` | 129 | EOF` |
130 | |||
131 | expect=`which expect` | ||
132 | if [ ! -x "$expect" ]; then | ||
133 | Test_Error "ERROR: Please install expect" | ||
134 | return 1 | ||
135 | fi | ||
136 | |||
123 | expect -c "$exp_cmd" | 137 | expect -c "$exp_cmd" |
124 | ret=$? | 138 | ret=$? |
125 | rm -rf $tmpfile | 139 | rm -rf $tmpfile |