t2sde/tests/982-install-minimal-xorg.exp
René Rebe 307cadbae9 * imported unit tests from int repo
git-svn-id: https://svn.exactcode.de/t2/trunk@69305 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
2024-06-04 14:42:09 +00:00

274 lines
2.6 KiB
Plaintext

#!/usr/bin/expect -f
set qemu [lindex $argv 0]
set argv [lreplace $argv 0 0]
# Wait enough (forever) until a long-time boot
set timeout 30
#timeout {exit 1}
# Start the guest VM
spawn $qemu -nographic {*}$argv
# TODO: detect grub and send \n to avoid delay
if { [string match "*-*86*" $qemu] } {
expect {
timeout {exit 1}
"*GNU GRUB*"
}
set send_slow {3 .1}
# edit grub entry w/ arrow key escapes and C-x
send "e"
send -s "\033\[B\033\[B\033\[B\033\[D"
# after 10
send -s " console=ttyS0\030"
}
set send_slow {8 .1}
expect {
timeout {exit 1}
"T2 SDE installer first stage*"
}
expect {
timeout {exit 1}
"* hit enter otherwise. (default:*"
}
send "\n"
expect {
timeout {exit 1}
"install:/#"
}
send "install\n"
expect {
timeout {exit 1}
"keyboard mapping"
}
send "\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "1\n"
expect {
timeout {exit 1}
"Classic partitions"
}
send "1\n"
expect {
timeout {exit 1}
"Erasing"
}
send "\n"
expect {
timeout {exit 1}
"Create filesystem"
}
send "\n"
expect {
timeout {exit 1}
"Install the system"
}
send -s "\033\[B\033\[B\033\[B\033\[B\033\[B\033\[B"
send "\n"
expect {
timeout {exit 1}
"Start gasgui"
}
send "6\n"
expect {
timeout {exit 1}
"Full install"
}
# minimal-xorg
send "2\n"
expect {
timeout {exit 1}
"Install selected"
}
send "\n"
expect {
timeout {exit 1}
"Installing linux-"
}
expect {
timeout {exit 1}
"Installing sysfiles-"
}
expect {
timeout {exit 1}
"ontinue"
}
send "\n"
expect {
timeout {exit 1}
"keyboard mappings"
}
send "\n"
expect {
timeout {exit 1}
"ype password"
}
send "test\n"
expect {
timeout {exit 1}
"etype password"
}
send "test\n"
expect {
timeout {exit 1}
"following time"
}
# Europe
send "9\n"
expect {
timeout {exit 1}
"time zone"
}
# Berlin
send "6\n"
expect {
timeout {exit 1}
"date and time"
}
send "\n"
expect {
timeout {exit 1}
"locales"
}
send "3\n"
expect {
timeout {exit 1}
"install GRUB2 now"
}
send "\n"
expect {
timeout {exit 1}
"ontinue"
}
send "\n"
expect {
timeout {exit 1}
"ENTER to continue"
}
send "\n"
expect {
timeout {exit 1}
"Boot Loader Setup"
}
send "\t\n"
expect {
timeout {exit 1}
"Unconfigured interface"
}
send "\t\n"
expect {
timeout {exit 1}
"Network Configuration "
}
send "\t\n"
expect {
timeout {exit 1}
"SSH Daemon"
}
send "\t\n"
expect {
timeout {exit 1}
"Main Menu"
}
send "\t\n"
expect {
timeout {exit 1}
"and reboot"
}
send "\n"
expect {
timeout {exit 1}
"login:"
}
send "root\n"
expect {
timeout {exit 1}
"assword:"
}
send "test\n"
expect {
timeout {exit 1}
"root@"
}
send "poweroff\n"
expect {
timeout {exit 1}
"reboot: Power down"
}