Skip to content

Commit

Permalink
Add kernel-default-devel for sle-micro
Browse files Browse the repository at this point in the history
  • Loading branch information
coolgw committed Oct 20, 2024
1 parent fe990ba commit 2a817c1
Show file tree
Hide file tree
Showing 2 changed files with 22 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) {
return transactional::trup_call("-c pkg install " . join(' ', map { $_->{name} } @$result));
}
else {
return zypper_call('-t in ' . join(' ', map { $_->{name} } @$result));
}
}

=head2 set_zypper_lock_timeout
Expand Down
16 changes: 16 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("kernel-rt-devel");
}
else {
zypper_install_available("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 All @@ -387,6 +400,9 @@ sub run {
reboot_on_changes;
}

# The default LTP linux directory is /usr/src/linux
script_run("[ -d /usr/src/linux-rt ] && mv /usr/src/linux-rt /usr/src/linux");

setup_network;

# we don't run LVM tests in 32bit, thus not generating the runtest file
Expand Down

0 comments on commit 2a817c1

Please sign in to comment.