xref: /third_party/ltp/testcases/kdump/lib/ssh.tcl
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/testcases/kdump/lib/
1f08c3bdfSopenharmony_ciset cmd [lindex $argv 0]
2f08c3bdfSopenharmony_ciset pwd [lindex $argv 1]
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ci#exp_internal 1
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ci# 1 min timeout
7f08c3bdfSopenharmony_ci#set timeout 60
8f08c3bdfSopenharmony_ciset timeout -1
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_cieval spawn $cmd
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_ciexpect {
13f08c3bdfSopenharmony_ci    -nocase "(yes/no)?" { send "yes\r"; exp_continue }
14f08c3bdfSopenharmony_ci    -nocase "Password:" { send "$pwd\r" }
15f08c3bdfSopenharmony_ci    # Handling ssh keys have already been set up.
16f08c3bdfSopenharmony_ci    eof                 { exit }
17f08c3bdfSopenharmony_ci    #timeout             { exit 1 }
18f08c3bdfSopenharmony_ci}
19f08c3bdfSopenharmony_ci
20f08c3bdfSopenharmony_ci# Wait for eof.
21f08c3bdfSopenharmony_ciexpect
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ciexit 0
24

Indexes created Thu Nov 07 10:32:03 CST 2024