mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-22 02:13:08 +00:00
Update serial console handling for upstream changes
Upstream https://github.com/os-autoinst/openQA/pull/4973 requires us to poke things here a bit. This only works with the newer os-autoinst and openQA (there may be a way to conditionalize it to work with both, but I can't be bothered figuring it out, let's just update). Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
0f781bdaf2
commit
e89ec3017a
@ -42,6 +42,7 @@ sub init() {
|
||||
# Initialize the first virtio serial console as "virtio-console"
|
||||
if (check_var('BACKEND', 'qemu')) {
|
||||
$self->add_console('virtio-console', 'virtio_terminal', {});
|
||||
$self->add_console('user-virtio-console', 'virtio_terminal', {socked_path => cwd() . '/virtio_console_user'});
|
||||
for (my $num = 1; $num < get_var('VIRTIO_CONSOLE_NUM', 1); $num++) {
|
||||
# initialize second virtio serial console as
|
||||
# "virtio-console1", third as "virtio-console2" etc.
|
||||
|
@ -98,7 +98,7 @@ sub run {
|
||||
if (get_var("SERIAL_CONSOLE")) {
|
||||
# we direct the installer to virtio-console1, and use
|
||||
# virtio-console as a root console
|
||||
select_console('virtio-console1');
|
||||
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."; }
|
||||
|
@ -26,7 +26,7 @@ sub run {
|
||||
# First, preset the environment according to the chosen console. This test
|
||||
# can run both on a VNC based console, or a serial console.
|
||||
if (get_var("SERIAL_CONSOLE")) {
|
||||
select_console('virtio-console1');
|
||||
select_console('user-virtio-console');
|
||||
unless (testapi::is_serial_terminal) {
|
||||
die "The test does not run on a serial console when it should.";
|
||||
}
|
||||
@ -144,7 +144,7 @@ sub run {
|
||||
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");
|
||||
select_console("user-virtio-console");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user