* updated svt-av1 (2.1.0 -> 2.2.1)
[t2sde.git] / tests / 951-iso-initrd.exp
blobe895b358c6ddbcfcfff2529ca929e13e40d0038b
1 #!/usr/bin/expect -f
3 set qemu [lindex $argv 0]
4 set argv [lreplace $argv 0 0]
6 # Wait enough (forever) until a long-time boot
7 set timeout 30
8 #timeout {exit 1}
10 # Start the guest VM
11 spawn $qemu -nographic {*}$argv
13 # TODO: detect grub and send \n to avoid delay
15 if { [string match "*-*86*" $qemu] } {
16 expect {
17 timeout {exit 1}
18 "*GNU GRUB*"
21 set send_slow {3 .1}
23 # edit grub entry w/ arrow key escapes and C-x
24 send "e"
25 send -s "\033\[B\033\[B\033\[B\033\[D"
27 #after 10
28 send -s " console=ttyS0\030"
31 set send_slow {8 .1}
33 expect {
34 timeout {exit 1}
35 "T2 SDE installer first stage*"
38 expect {
39 timeout {exit 1}
40 "* hit enter otherwise. (default:*"
43 send "\n"
44 expect {
45 timeout {exit 1}
46 "install:/#"
50 send "echo o > /proc/sysrq-trigger\n"
51 expect {
52 timeout {exit 1}
53 "reboot: Power down"