From c68c215489535ab7d746389727ff61a51b4a34c1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 21 Jun 2024 09:40:17 -0700 Subject: [PATCH] Handle VNC question disappearing in serial mode too Signed-off-by: Adam Williamson --- tests/_boot_to_anaconda.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 43ccdc20..de24979f 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -127,9 +127,12 @@ sub run { # we direct the installer to virtio-console1, and use # virtio-console as a root console select_console('user-virtio-console'); - unless (wait_serial "Use text mode", timeout => 120) { die "Anaconda has not started."; } - type_string "2\n"; - unless (wait_serial "Installation") { die "Text version of Anaconda has not started."; } + my $match = wait_serial ["Use text mode", "Installation"], timeout => 120; + die "Anaconda has not started." unless ($match); + if ($match =~ m/Use text mode/) { + type_string "2\n"; + die "Text version of Anaconda has not started." unless (wait_serial "Installation"); + } } else { assert_screen ["anaconda_use_text_mode", "anaconda_main_hub_text"], 300;