summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-05-15 10:42:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-16 00:23:37 +0300
commitc3fabef454342e991a6dfd73f7037e5cf7731b09 (patch)
tree9eb4ea67aa0d455c82142e4e6372eaf2062e6c06
parent27069483c30c9458eccf8e89fd581750bbe1f522 (diff)
downloadpoky-c3fabef454342e991a6dfd73f7037e5cf7731b09.tar.gz
qemuimage-testlib: pass optional timeout to ssh function
Sometimes we need to change the timeout used by the function for certain kinds of tests. (From OE-Core rev: 21950ff5eb032fefc4753bd68af57f655d0c61f2) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/qemuimage-testlib13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 1fa9b4edbd..475231bbc4 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -144,10 +144,15 @@ EOF`
144# function to run command in $ip_addr via ssh 144# function to run command in $ip_addr via ssh
145Test_SSH() 145Test_SSH()
146{ 146{
147 local ip_addr=$1 147 local ip_addr="$1"
148 shift 148 local command="$2"
149 local command=$@ 149
150 local time_out=60 150 if [ $# -eq 3 ]; then
151 local time_out=$3
152 else
153 local time_out=60
154 fi
155
151 local ret=0 156 local ret=0
152 local exp_cmd=`cat << EOF 157 local exp_cmd=`cat << EOF
153eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command" 158eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"