summaryrefslogtreecommitdiffstats
path: root/scripts/qemuimage-testlib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qemuimage-testlib')
-rwxr-xr-xscripts/qemuimage-testlib8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 22e2d4168f..daa1ac0605 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -84,13 +84,12 @@ Test_SCP()
84 local ip_addr=$1 84 local ip_addr=$1
85 local src=$2 85 local src=$2
86 local des=$3 86 local des=$3
87 local tmpfile=`mktemp`
88 local time_out=60 87 local time_out=60
89 local ret=0 88 local ret=0
90 89
91 # We use expect to interactive with target by ssh 90 # We use expect to interactive with target by ssh
92 local exp_cmd=`cat << EOF 91 local exp_cmd=`cat << EOF
93eval spawn scp -o UserKnownHostsFile=$tmpfile "$src" root@$ip_addr:"$des" 92eval spawn scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$src" root@$ip_addr:"$des"
94set timeout $time_out 93set timeout $time_out
95expect { 94expect {
96 "*assword:" { send "\r"; exp_continue} 95 "*assword:" { send "\r"; exp_continue}
@@ -107,7 +106,6 @@ EOF`
107 106
108 expect -c "$exp_cmd" 107 expect -c "$exp_cmd"
109 ret=$? 108 ret=$?
110 rm -rf $tmpfile
111 return $ret 109 return $ret
112} 110}
113 111
@@ -117,11 +115,10 @@ Test_SSH()
117 local ip_addr=$1 115 local ip_addr=$1
118 shift 116 shift
119 local command=$@ 117 local command=$@
120 local tmpfile=`mktemp`
121 local time_out=60 118 local time_out=60
122 local ret=0 119 local ret=0
123 local exp_cmd=`cat << EOF 120 local exp_cmd=`cat << EOF
124eval spawn ssh -o UserKnownHostsFile=$tmpfile root@$ip_addr "$command" 121eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"
125set timeout $time_out 122set timeout $time_out
126expect { 123expect {
127 "*assword:" { send "\r"; exp_continue} 124 "*assword:" { send "\r"; exp_continue}
@@ -138,7 +135,6 @@ EOF`
138 135
139 expect -c "$exp_cmd" 136 expect -c "$exp_cmd"
140 ret=$? 137 ret=$?
141 rm -rf $tmpfile
142 return $ret 138 return $ret
143} 139}
144 140