Skip to content

Commit

Permalink
DESKTOP=gnome System's ram must be at least 4GB
Browse files Browse the repository at this point in the history
  • Loading branch information
rfan1 committed Feb 1, 2024
1 parent b811fd9 commit 25920d8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
24 changes: 23 additions & 1 deletion lib/utils.pm
Expand Up @@ -11,7 +11,7 @@ use warnings;
use testapi qw(is_serial_terminal :DEFAULT);
use lockapi 'mutex_wait';
use mm_network;
use version_utils qw(is_alp is_sle_micro is_microos is_leap is_leap_micro is_public_cloud is_sle is_sle12_hdd_in_upgrade is_storage_ng is_jeos package_version_cmp is_transactional is_bootloader_sdboot);
use version_utils qw(is_alp is_sle_micro is_microos is_tumbleweed is_leap is_leap_micro is_public_cloud is_sle is_sle12_hdd_in_upgrade is_storage_ng is_jeos package_version_cmp is_transactional is_bootloader_sdboot);
use Utils::Architectures;
use Utils::Systemd qw(systemctl disable_and_stop_service);
use Utils::Backends;
Expand Down Expand Up @@ -114,6 +114,7 @@ our @EXPORT = qw(
write_sut_file
@all_tests_results
ping_size_check
handle_gnome_memory_ge_4g
);

our @EXPORT_OK = qw(
Expand Down Expand Up @@ -2927,4 +2928,25 @@ sub write_sut_file {
assert_script_run("curl -v -o $path $url");
}

=head2 handle_gnome_memory_ge_4g
handle_gnome_memory_ge_4g([fatal_flag => $fatal_flag])
Handle gnome test on sle, system's ram must be at least 4GB
https://progress.opensuse.org/issues/153808.
=cut

sub handle_gnome_memory_ge_4g {
my (%args) = @_;
$args{fatal_flag} //= 1;

my $os_handled = is_tumbleweed || is_leap('>=15.5') || is_sle('>=15-SP5');
my $backend_handled = is_qemu || is_svirt;
if (check_var('DESKTOP', 'gnome') && get_var('GNOME_MEMORY_GE_4G', '1') && $os_handled && $backend_handled && (get_var('QEMURAM', 1024) < 4096)) {
die "DESKTOP=gnome System's ram must be at least 4GB, see poo#153808" if ($args{fatal_flag});
record_soft_failure "DESKTOP=gnome System's ram should be at least 4GB, see poo#153808";
}
}

1;
4 changes: 4 additions & 0 deletions tests/boot/boot_to_desktop.pm
Expand Up @@ -17,8 +17,12 @@ use testapi;
use Utils::Architectures;
use Utils::Backends;
use version_utils qw(is_upgrade is_sles4sap is_sle is_alp is_sle_micro);
use utils 'handle_gnome_memory_ge_4g';

sub run {
# https://progress.opensuse.org/issues/153808
handle_gnome_memory_ge_4g(fatal_flag => 0);

my ($self) = @_;
$self->{in_boot_desktop} = 1;
# We have tests that boot from HDD and wait for DVD boot menu's timeout, so
Expand Down
4 changes: 4 additions & 0 deletions tests/installation/first_boot.pm
Expand Up @@ -18,8 +18,12 @@ use warnings;
use base 'bootbasetest';
use testapi;
use x11utils 'turn_off_plasma_tooltips';
use utils 'handle_gnome_memory_ge_4g';

sub run {
# https://progress.opensuse.org/issues/153808
handle_gnome_memory_ge_4g();

shift->wait_boot_past_bootloader;
# This only works with generic-desktop. In the opensuse-welcome case,
# the opensuse-welcome module will handle it instead.
Expand Down
1 change: 1 addition & 0 deletions variables.md
Expand Up @@ -370,6 +370,7 @@ PUBLIC_CLOUD_PY_BACKPORTS_REPO | string | "" | PY Backport repo URL for azure_mo
PUBLIC_CLOUD_PY_AZURE_REPO | string | "" | PY azure repo URL for azure_more_cli_test.
PUBLIC_CLOUD_TOOLS_REPO | string | "" | cloud tools repo URL for azure_more_cli_test.
PUBLIC_CLOUD_EMBARGOED_UPDATES_DETECTED | boolean | true | Internal variable written by the code and readed by the code . Should NOT be set manually
GNOME_MEMORY_GE_4G | boolean | 1 | DESKTOP=gome System's ram must be at least 4GB unless explicitly asked


### Wicked testsuite specifc variables
Expand Down

0 comments on commit 25920d8

Please sign in to comment.