Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DESKTOP=gnome System's ram must be at least 4GB #18521

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 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,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_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