Skip to content

Commit

Permalink
Install kernel-dev package for sle-micro LTP test
Browse files Browse the repository at this point in the history
  • Loading branch information
coolgw committed Oct 18, 2024
1 parent fe990ba commit 65ae4d2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,12 @@ sub zypper_install_available {
my $packlist = join(' ', @_);
my $result = zypper_search("-t package --match-exact $packlist");

return zypper_call('-t in ' . join(' ', map { $_->{name} } @$result));
if (is_transactional) {
trup_call "pkg install" . join(' ', map { $_->{name} } @$result);
}
else {
return zypper_call('-t in ' . join(' ', map { $_->{name} } @$result));
}
}

=head2 set_zypper_lock_timeout
Expand Down
13 changes: 13 additions & 0 deletions tests/kernel/install_ltp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,17 @@ sub setup_network {
}
}

sub install_ltp_extra_dep_package {
if (is_transactional) {
if ((get_var('FLAVOR', '') =~ /Base-RT-Updates|Base-RT|Base-RT-encrypted/)) {
zypper_install_available('in kernel-rt-devel');
}
else {
zypper_install_available('in kernel-default-devel');
}
}
}

sub run {
my $self = shift;
my $inst_ltp = get_var 'INSTALL_LTP';
Expand Down Expand Up @@ -363,6 +374,8 @@ sub run {
}
}

install_ltp_extra_dep_package();

log_versions 1;

zypper_call('in efivar') if is_sle('12+') || is_opensuse;
Expand Down

0 comments on commit 65ae4d2

Please sign in to comment.