summaryrefslogtreecommitdiff
path: root/tests/shell_interaction.expect
blob: 72f8676cfdc3fdd959de51efceaf69f9cea1b0f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/expect
set args [lrange $argv 0 end]
set timeout 300
spawn {*}$args
expect "root@testvm:~#"
set timeout 10
send "echo 6coF0JBW\$((2+3))\r"
expect {
	"6coF0JBW5" { }
	timeout	{ exit 1 }
}
expect "root@testvm:~#"
send "poweroff\r"
set timeout 120
expect eof