From: Stefan Stanacar Date: Wed, 15 May 2013 10:42:18 +0000 (+0000) Subject: qemuimage-testlib: pass optional timeout to ssh function X-Git-Tag: rev_ivi_2015_02_04~12522 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73a58dbf90d6d460ee381194fc790c17d909b410;p=scm%2Fbb%2Ftizen-distro.git 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 Signed-off-by: Richard Purdie --- diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib index 1fa9b4e..475231b 100755 --- a/scripts/qemuimage-testlib +++ b/scripts/qemuimage-testlib @@ -144,10 +144,15 @@ EOF` # function to run command in $ip_addr via ssh Test_SSH() { - local ip_addr=$1 - shift - local command=$@ - local time_out=60 + local ip_addr="$1" + local command="$2" + + if [ $# -eq 3 ]; then + local time_out=$3 + else + local time_out=60 + fi + local ret=0 local exp_cmd=`cat << EOF eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"