From af677c8f9c215b56a264658103c76e99b8c63338 Mon Sep 17 00:00:00 2001 From: lumarel Date: Wed, 10 Nov 2021 17:21:43 +0100 Subject: [PATCH] Make sure that the disk post installs run in a shell it happens that the previous test ends in the GUI --- tests/disk_custom_lvm_ext4_postinstall.pm | 5 +++++ tests/disk_custom_lvmthin_postinstall.pm | 5 +++++ tests/disk_custom_software_raid_postinstall.pm | 5 +++++ tests/disk_custom_standard_partition_ext4_postinstall.pm | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/tests/disk_custom_lvm_ext4_postinstall.pm b/tests/disk_custom_lvm_ext4_postinstall.pm index 8f66a443..d72c18a4 100644 --- a/tests/disk_custom_lvm_ext4_postinstall.pm +++ b/tests/disk_custom_lvm_ext4_postinstall.pm @@ -1,8 +1,13 @@ use base "installedtest"; use strict; use testapi; +use utils; sub run { + my $self = shift; + unless (check_screen "root_console", 0) { + $self->root_console(tty=>4); + } assert_screen "root_console"; my $devboot = 'vda1'; diff --git a/tests/disk_custom_lvmthin_postinstall.pm b/tests/disk_custom_lvmthin_postinstall.pm index 1f2d4c25..0d941739 100644 --- a/tests/disk_custom_lvmthin_postinstall.pm +++ b/tests/disk_custom_lvmthin_postinstall.pm @@ -1,8 +1,13 @@ use base "installedtest"; use strict; use testapi; +use utils; sub run { + my $self = shift; + unless (check_screen "root_console", 0) { + $self->root_console(tty=>4); + } assert_screen "root_console"; # check that lvmthinpool is present: # http://atodorov.org/blog/2015/04/14/how-to-find-if-lvm-volume-is-thinly-provisioned/ diff --git a/tests/disk_custom_software_raid_postinstall.pm b/tests/disk_custom_software_raid_postinstall.pm index 6cff869e..ad3d53d1 100644 --- a/tests/disk_custom_software_raid_postinstall.pm +++ b/tests/disk_custom_software_raid_postinstall.pm @@ -1,8 +1,13 @@ use base "installedtest"; use strict; use testapi; +use utils; sub run { + my $self = shift; + unless (check_screen "root_console", 0) { + $self->root_console(tty=>4); + } assert_screen "root_console"; # check that RAID is used assert_script_run "cat /proc/mdstat | grep 'Personalities : \\\[raid1\\\]'"; diff --git a/tests/disk_custom_standard_partition_ext4_postinstall.pm b/tests/disk_custom_standard_partition_ext4_postinstall.pm index 429eabdb..a80d3858 100644 --- a/tests/disk_custom_standard_partition_ext4_postinstall.pm +++ b/tests/disk_custom_standard_partition_ext4_postinstall.pm @@ -1,8 +1,13 @@ use base "installedtest"; use strict; use testapi; +use utils; sub run { + my $self = shift; + unless (check_screen "root_console", 0) { + $self->root_console(tty=>4); + } assert_screen "root_console"; my $count = 4; my $devroot = 'vda1';