From 82db1770d5b25616322671a81de237e959d1adbf Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 20 Nov 2019 09:04:31 -0800 Subject: [PATCH] Hack around a serial console prompt check failing during install os-autoinst has this code when doing `script_run` on a serial terminal that does a `wait_serial` for '# ' before running the command. For some reason when we switch to the anaconda root console and run a couple of commands after finishing install on ppc64, the first of these prompt checks times out, which means the test sits there doing nothing for 90 seconds unnecessarily. Let's try and avoid that by hacking the prompt check regex to be empty. Signed-off-by: Adam Williamson --- tests/install_text.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/install_text.pm b/tests/install_text.pm index f25f0ec8..b02b7f26 100644 --- a/tests/install_text.pm +++ b/tests/install_text.pm @@ -129,11 +129,16 @@ sub run { if (testapi::is_serial_terminal) { wait_serial("Installation complete", timeout=>$timeout); if (get_var("SERIAL_CONSOLE") && get_var("OFW")) { + # for some reason the check for a prompt times out here, even + # though '# ' is clearly in the terminal log; hack it out + my $origprompt = $testapi::distri->{serial_term_prompt}; + $testapi::distri->{serial_term_prompt} = ''; $self->root_console(); # we need to force the system to load a console on both hvc1 # and hvc2 for ppc64 serial console post-install tests assert_script_run 'chroot /mnt/sysimage systemctl enable serial-getty@hvc1'; assert_script_run 'chroot /mnt/sysimage systemctl enable serial-getty@hvc2'; + $testapi::distri->{serial_term_prompt} = $origprompt; # back to anaconda ui select_console("virtio-console1"); }