Skip to content

Commit

Permalink
Harmonize updating handling SUSE/openSUSE
Browse files Browse the repository at this point in the history
  • Loading branch information
jknphy committed Jun 8, 2018
1 parent 662562d commit e715250
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
23 changes: 10 additions & 13 deletions lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1042,11 +1042,6 @@ sub load_consoletests {
{
loadtest "console/glibc_sanity";
}
# openSUSE has "load_system_update_tests" for that,
# https://progress.opensuse.org/issues/31954 to improve
if (is_sle && !gnomestep_is_applicable()) {
loadtest "update/zypper_up";
}
loadtest "console/console_reboot" if is_jeos;
loadtest "console/zypper_in";
loadtest "console/yast2_i";
Expand Down Expand Up @@ -1130,13 +1125,17 @@ sub load_consoletests {
loadtest "console/consoletest_finish";
}

sub load_x11tests {
sub x11tests_is_applicable {
return
unless (!get_var("INSTALLONLY")
&& is_desktop_installed()
&& !get_var("DUALBOOT")
&& !get_var("RESCUECD")
&& !get_var("HA_CLUSTER"));
!get_var("INSTALLONLY")
&& is_desktop_installed()
&& !get_var("DUALBOOT")
&& !get_var("RESCUECD")
&& !get_var("HA_CLUSTER");
}

sub load_x11tests {
return unless x11_is_applicable();
if (is_smt()) {
loadtest "x11/smt";
}
Expand All @@ -1155,8 +1154,6 @@ sub load_x11tests {
loadtest "x11/xterm";
loadtest "x11/sshxterm" unless get_var("LIVETEST");
if (gnomestep_is_applicable()) {
# openSUSE has an explicit update check elsewhere
loadtest "update/updates_packagekit_gpk" if is_sle && !is_staging;
loadtest "x11/gnome_control_center";
# TODO test on SLE https://progress.opensuse.org/issues/31972
loadtest "x11/gnome_tweak_tool" if is_opensuse;
Expand Down
2 changes: 1 addition & 1 deletion products/opensuse/main.pm
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ sub load_system_update_tests {
if (need_clear_repos) {
loadtest "update/zypper_clear_repos";
}

if (get_var('ZYPPER_ADD_REPOS')) {
loadtest "console/zypper_add_repos";
}
Expand Down
11 changes: 11 additions & 0 deletions products/sle/main.pm
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,15 @@ sub load_default_autoyast_tests {
load_reboot_tests;
}

sub load_system_update_tests {
if (x11tests_is_applicable() && gnomestep_is_applicable()) {
loadtest "update/updates_packagekit_gpk" if is_sle && !is_staging;
}
elsif (consolestep_is_applicable() && is_sle) {
loadtest "update/zypper_up";
}
}

my $distri = testapi::get_required_var('CASEDIR') . '/lib/susedistribution.pm';
require $distri;
testapi::set_distribution(susedistribution->new());
Expand Down Expand Up @@ -919,6 +928,7 @@ elsif (get_var("QAM_MINIMAL")) {
loadtest "qam-minimal/check_logs";
if (check_var("QAM_MINIMAL", 'full')) {
loadtest "qam-minimal/install_patterns";
load_system_update_tests();
load_consoletests();
load_x11tests();

Expand Down Expand Up @@ -1103,6 +1113,7 @@ else {
}
}
unless (load_applicationstests() || load_slenkins_tests()) {
load_system_update_tests();
load_rescuecd_tests();
load_consoletests();
load_x11tests();
Expand Down

0 comments on commit e715250

Please sign in to comment.