Skip to content

Commit

Permalink
qa_test_klp: Add support for transactional systems
Browse files Browse the repository at this point in the history
Use the install_package() helper function instead of direct zypper_call().
  • Loading branch information
mdoucha committed Feb 5, 2025
1 parent 35b4d53 commit 31c9293
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions tests/kernel/qa_test_klp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,36 @@ use serial_terminal 'select_serial_terminal';
use utils;
use registration;
use version_utils 'is_sle';
use transactional;
use package_utils;

sub run {
if (get_var('AZURE')) {
record_info("Azure don't have kGraft/LP infrastructure");
return;
}

if (script_run('[ -d /lib/modules/$(uname -r)/build ]') != 0) {
if (check_var('SLE_PRODUCT', 'slert')) {
zypper_call('in -l kernel-devel-rt');
}
else {
zypper_call('in -l kernel-devel');
}
}

my $git_repo = get_required_var('QA_TEST_KLP_REPO');
my $dir = basename($git_repo);
$dir =~ s/\.git$//;

(is_sle(">12-sp1") || !is_sle) ? select_serial_terminal() : select_console('root-console');

add_suseconnect_product("sle-sdk") if (is_sle('<12-SP5'));
zypper_call('in -l autoconf automake gcc git make');
install_package('autoconf automake gcc git make');

if (script_run('[ -d /lib/modules/$(uname -r)/build ]') != 0) {
my $devel_pack = 'kernel-devel';

if (check_var('SLE_PRODUCT', 'slert')) {
$devel_pack = 'kernel-devel-rt';
}

# Force recommended packages to pull in kernel-default-devel, etc.
install_package("--recommends $devel_pack", trup_continue => 1);
}

reboot_on_changes;

assert_script_run('git config --global http.sslVerify false');
assert_script_run('git clone ' . $git_repo);
Expand Down

0 comments on commit 31c9293

Please sign in to comment.