]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemuimage-testlib: pass optional timeout to ssh function
authorStefan Stanacar <stefanx.stanacar@intel.com>
Wed, 15 May 2013 10:42:18 +0000 (10:42 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 May 2013 21:22:52 +0000 (00:22 +0300)
Sometimes we need to change the timeout used by the function for
certain kinds of tests.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/qemuimage-testlib

index 1fa9b4edbdf2f7d5137cd160dec5eec4d294cb6e..475231bbc489f39a53ab1b38808499f948a3475d 100755 (executable)
@@ -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"