Skip to content

Commit

Permalink
[Virtualization][MU]: add migration test load logic in main.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-suse committed Jul 12, 2024
1 parent 8c50385 commit 8d01ab1
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2451,18 +2451,20 @@ sub load_hypervisor_tests {

if (check_var('ENABLE_VM_INSTALL', 1)) {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/prepare_guests";
loadtest "virtualization/universal/waitfor_guests";
if (check_var('PATCH_WITH_ZYPPER', 1)) {
loadtest "virtualization/universal/patch_and_reboot";
if (my $update_package = get_var('UPDATE_PACKAGE')) {
if ($update_package eq 'kernel-default') {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
loadtest "virtualization/universal/patch_guests";
} elsif ($update_package eq 'xen' || $update_package eq 'qemu') {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
unless (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1')) {
loadtest "virtualization/universal/prepare_guests";
loadtest "virtualization/universal/waitfor_guests";
if (check_var('PATCH_WITH_ZYPPER', 1)) {
loadtest "virtualization/universal/patch_and_reboot";
if (my $update_package = get_var('UPDATE_PACKAGE')) {
if ($update_package eq 'kernel-default') {

Check warning on line 2460 in lib/main_common.pm

View workflow job for this annotation

GitHub Actions / CI: Running unit tests with perl v5.32

Code structure is deeply nested - severity 4

Consider refactoring
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
loadtest "virtualization/universal/patch_guests";
} elsif ($update_package eq 'xen' || $update_package eq 'qemu') {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
}
}
}
}
Expand Down Expand Up @@ -2524,6 +2526,17 @@ sub load_hypervisor_tests {
}
# Load ENABLE_SNAPSHOTS at the end
check_and_load_mu_virt_features('ENABLE_SNAPSHOTS', $virt_features{ENABLE_SNAPSHOTS}{modules}, $virt_features{ENABLE_SNAPSHOTS}{hypervisor});

# Guest migration tests
if (check_var('VIRT_NEW_GUEST_MIGRATION_SOURCE', '1')) {
loadtest "virt_autotest/login_console";
loadtest "virt_autotest/parallel_guest_migration_source";
}
if (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1')) {
loadtest "virt_autotest/parallel_guest_migration_barrier";
loadtest "virt_autotest/login_console";
loadtest "virt_autotest/parallel_guest_migration_destination";
}
}

sub load_extra_tests_syscontainer {
Expand Down

0 comments on commit 8d01ab1

Please sign in to comment.