1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-22 14:03:09 +00:00

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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-11-20 09:04:31 -08:00
parent 67e7415f2f
commit 82db1770d5

View File

@ -129,11 +129,16 @@ sub run {
if (testapi::is_serial_terminal) { if (testapi::is_serial_terminal) {
wait_serial("Installation complete", timeout=>$timeout); wait_serial("Installation complete", timeout=>$timeout);
if (get_var("SERIAL_CONSOLE") && get_var("OFW")) { 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(); $self->root_console();
# we need to force the system to load a console on both hvc1 # we need to force the system to load a console on both hvc1
# and hvc2 for ppc64 serial console post-install tests # 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@hvc1';
assert_script_run 'chroot /mnt/sysimage systemctl enable serial-getty@hvc2'; assert_script_run 'chroot /mnt/sysimage systemctl enable serial-getty@hvc2';
$testapi::distri->{serial_term_prompt} = $origprompt;
# back to anaconda ui # back to anaconda ui
select_console("virtio-console1"); select_console("virtio-console1");
} }