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 Jan 29, 2024
1 parent b811fd9 commit 7da20eb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/utils.pm
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,23 @@ 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;

if (check_var('DESKTOP', 'gnome') && get_var('GNOME_MEMORY_GE_4G', '1') && is_sle('>=15-SP5') && (is_qemu || is_svirt) && (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 7da20eb

Please sign in to comment.