diff --git a/lib/utils.pm b/lib/utils.pm index 1b9653e73cd1..4b62341806c1 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -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 diff --git a/tests/kernel/install_ltp.pm b/tests/kernel/install_ltp.pm index ba7da8e7e599..15120f1e89f1 100644 --- a/tests/kernel/install_ltp.pm +++ b/tests/kernel/install_ltp.pm @@ -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'; @@ -363,6 +374,8 @@ sub run { } } + install_ltp_extra_dep_package(); + log_versions 1; zypper_call('in efivar') if is_sle('12+') || is_opensuse; @@ -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