t2sde/tests/992-install-lvm-raid-text-minimal.exp
René Rebe 2f40be059c * initial lvm-raid unit test
git-svn-id: https://svn.exactcode.de/t2/trunk@73738 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
2025-02-06 10:12:26 +00:00

474 lines
4.2 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 -text\n"
expect {
timeout {exit 1}
"keyboard mapping"
}
send "1\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "1\n"
expect {
timeout {exit 1}
"Classic partitions"
}
send "3\n"
expect {
timeout {exit 1}
"Erasing"
}
send "1\n"
expect {
timeout {exit 1}
"Create filesystem"
}
send "0\n"
expect {
timeout {exit 1}
"ENTER"
}
send "\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "4\n"
expect {
timeout {exit 1}
"partition table:"
}
send "6\n"
expect {
timeout {exit 1}
"Command "
}
send "g\n"
send "n\n\n\n\n"
send "w\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "5\n"
expect {
timeout {exit 1}
"Create physical"
}
send "5\n"
expect {
timeout {exit 1}
"Add physical"
}
send "\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "7\n"
expect {
timeout {exit 1}
"Remove logical"
}
send "7\ny\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "7\n"
expect {
timeout {exit 1}
"deactivate the swap"
}
send "y\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "7\n"
expect {
timeout {exit 1}
"Remove logical"
}
send "8\ny\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "6\n"
expect {
timeout {exit 1}
"RAID 1"
}
send "4\n"
expect {
timeout {exit 1}
"size"
}
send "98%FREE\n"
expect {
timeout {exit 1}
"name"
}
send "root\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "6\n"
expect {
timeout {exit 1}
"RAID 0"
}
send "3\n"
expect {
timeout {exit 1}
"size"
}
send "100%FREE\n"
expect {
timeout {exit 1}
"name"
}
send "swap\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "7\n"
expect {
timeout {exit 1}
"Create filesystem"
}
send "1\n"
expect {
timeout {exit 1}
"btrfs"
}
send "1\n"
expect {
timeout {exit 1}
"Mount"
}
send "\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "8\n"
expect {
timeout {exit 1}
"Create swap"
}
send "2\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "2\n"
expect {
timeout {exit 1}
"Mount"
}
send "1\n\n"
expect {
timeout {exit 1}
"Storage setup:"
}
send "9\n"
expect {
timeout {exit 1}
"Start gasgui"
}
send "6\n"
expect {
timeout {exit 1}
"Full install"
}
# minimal
send "3\n"
expect {
timeout {exit 1}
"Install selected"
}
send "\n"
expect {
timeout {exit 1}
#"Error while installing package" {exit 1}
"Installing linux-"
}
expect {
timeout {exit 1}
#"Error while installing package" {exit 1}
"Installing sysfiles-"
}
expect {
timeout {exit 1}
"ENTER to continue"
}
send "\n"
expect {
timeout {exit 1}
"keyboard mappings"
}
send "1\n"
expect {
timeout {exit 1}
" password"
}
send "test\n"
expect {
timeout {exit 1}
" 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}
"ENTER to continue"
}
send "\n"
expect {
timeout {exit 1}
"ENTER to continue"
}
send "\n"
expect {
timeout {exit 1}
"Boot Loader Setup"
}
send "\n"
expect {
timeout {exit 1}
"Unconfigured interface"
}
send "n\n"
expect {
timeout {exit 1}
"Network Configuration "
}
send "\n"
expect {
timeout {exit 1}
"SSH Daemon"
}
send "\n"
expect {
timeout {exit 1}
"Main Menu"
}
send "\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"
}