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>
# 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"