mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
27069483c3
commit
c3fabef454
@@ -144,10 +144,15 @@ EOF`
|
|||||||
# function to run command in $ip_addr via ssh
|
# function to run command in $ip_addr via ssh
|
||||||
Test_SSH()
|
Test_SSH()
|
||||||
{
|
{
|
||||||
local ip_addr=$1
|
local ip_addr="$1"
|
||||||
shift
|
local command="$2"
|
||||||
local command=$@
|
|
||||||
local time_out=60
|
if [ $# -eq 3 ]; then
|
||||||
|
local time_out=$3
|
||||||
|
else
|
||||||
|
local time_out=60
|
||||||
|
fi
|
||||||
|
|
||||||
local ret=0
|
local ret=0
|
||||||
local exp_cmd=`cat << EOF
|
local exp_cmd=`cat << EOF
|
||||||
eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"
|
eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"
|
||||||
|
|||||||
Reference in New Issue
Block a user