-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harmonize the main.pm files further to DRY #4432
Conversation
products/caasp/main.pm
Outdated
@@ -43,7 +43,7 @@ if (check_var('VIRSH_VMM_FAMILY', 'xen') && check_var('VIRSH_VMM_TYPE', 'linux') | |||
set_var('SERIALDEV', 'hvc0'); | |||
} | |||
|
|||
sub load_boot_tests { | |||
sub load_kubic_boot_tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kravciak are you fine with this rename to ensure we can use "load_boot_tests" to use that for the "common" ones or would you recommend to also rename the openSUSE/SLE ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If rename helps you then I don't care, but I don't see the need for it - function is overloaded in caasp/main.pm and it does not conflict with SLE/main_common - or did I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't know how the overloading should work but perl reports an error (or at least a warning?) about the method in products/caasp/main.pm this is why I changed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, then feel free to change it, but please don't use kubic naming scheme - it's a bit misleading in caasp/main.pm. What about:
load_boot_tests -> caasp_boot_tests
load_inst_tests -> load_oci_tests || caasp_inst_tests
|
||
# TODO check why we want this enabled on SLE staging but not openSUSE staging | ||
sub packagekit_available { | ||
return !check_var('FLAVOR', 'Rescue-CD') && (!is_staging || is_sle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DimStar77 @lnussel this differs between SLE and openSUSE and causes the "glxgears" test to not run on openSUSE staging tests but on SLE. "glxgears" is important for SLE because it is the only packagekit based install test in staging tests. Any reason why we should not enable this on openSUSE as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally speaking, we should be able to cope with glxgears in Stagings (Staging2 only, or Mesa-demo would need to move to Ring1) - at least for TW I'll have to add Mesa-demo to the test DVD, but that cost is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #4443 , based on this PR here. http://lord.arch/tests/606#step/glxgears/12 shows Mesa-demo-x missing. Can you add it?
lib/main_common.pm
Outdated
return (check_var("FLAVOR", 'Rescue-CD') || get_var("LIVETEST")); | ||
} | ||
|
||
sub is_kde_live { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we keep everything which calculate version in version_utils ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing with you in person I moved some functions into version_utils as well as utils but not this one because it is only used in this file here and also not exported.
# with SLE 15 LeanOS only the default is textmode | ||
return 'gnome' if get_var('BASE_VERSION', '') =~ /^12/; | ||
return 'textmode' if (get_var('SYSTEM_ROLE') && !check_var('SYSTEM_ROLE', 'default')); | ||
return 'gnome' if is_desktop_module_selected; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most probably it works as expected after all but just FYI that is_sles4sap defined as positive condition in both is_desktop_module_selected and is_server. So switching lines 302 and 300 will bring different results for SAP guys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think me just moving it to a different file should have an effect like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't things , my comment regarding version_utils not related to this. actually after discussing with you in person I can say that you can ignore this comment because it is just code which you move from one place to another.
make travis green and I will merge |
9be1504
to
a16d808
Compare
The "default" tests are the ones that are called in a hidden "else" branch when all other test variables do not evaluate to another explicit test schedule. This should be more apparent.
* DRY on openSUSE/SLE load_ssh_key_import_tests * DRY on openSUSE/SLE load_inst_tests * DRY on openSUSE/SLE load_console_tests * DRY on openSUSE/SLE load_x11_tests * DRY on openSUSE/SLE x11regression tests The impact of the change should be only on the schedule so I mainly compared the evaluated schedule rather than look into the results from the test modules. Mainly the change is a refactoring with no visible impact on actual test execution. However, in some cases the order of modules execution was changed for either SLE or openSUSE to harmonize both. Verification runs: * openSUSE staging cryptlvm: http://lord.arch/tests/596 * openSUSE TW textmode: http://lord.arch/tests/601 * openSUSE TW textmode: http://lord.arch/tests/591 * openSUSE TW gnome: http://lord.arch/tests/595 * openSUSE TW kde: http://lord.arch/tests/603 * openSUSE TW lxde: http://lord.arch/tests/593 * openSUSE TW lxde: http://lord.arch/tests/598 * openSUSE Leap 42.3 maintenance gnome: http://lord.arch/tests/589 * SLE staging gnome: http://lord.arch/tests/597 Related progress issue: https://progress.opensuse.org/issues/15132
lib/main_common.pm is meant as a common file for the test schedules. Therefore functions from this file should not be imported by test modules. This commit moves the corresponding functions to better places, e.g. `version_utils` or `utils`.
Fix order of setup_online_repos and timezone (regression in #4432)
…utoinst#4432) See https://openqa.opensuse.org/tests/615862#step/hostname_inst/2 Seems like hostname_inst was never tried on openSUSE.
Fix wrong scheduling of hostname_inst on openSUSE (regression in #4432)
Fix wrong scheduling of chromium on SLE (regression in #4432)
use strict; | ||
use warnings; | ||
use testapi qw(check_var get_var get_required_var set_var check_var_array diag); | ||
use lockapi; | ||
use needle; | ||
use registration; | ||
use utils; | ||
use version_utils qw(is_hyperv_in_gui is_caasp is_installcheck is_rescuesystem sle_version_at_least is_desktop_installed is_jeos is_sle is_upgrade); | ||
use version_utils qw(is_hyperv_in_gui is_caasp is_installcheck is_rescuesystem sle_version_at_least is_desktop_installed is_jeos is_sle is_staging is_upgrade); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't is_sles4sap()
and is_sles4sap_standard()
be also included in this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Saw that is_sles4sap
is being exported in lib/main_common
, so I guess the fix should be to add is_sles4sap_standard
also there.
{ | ||
loadtest "installation/system_role"; | ||
} | ||
if (is_sles4sap() and sle_version_at_least('15')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was and check_var('SYSTEM_ROLE', 'default')
dropped from the condition? In SLES4SAP, when any of the SLES System Roles are selected, the installer goes directly to partitioning instead of the SLES4SAP Product Installation Mode screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workaround bsc#1070233 for TW as well after we hit it after #4432
…utoinst#4432) See https://openqa.opensuse.org/tests/615862#step/hostname_inst/2 Seems like hostname_inst was never tried on openSUSE.
The impact of the change should be only on the schedule so I mainly compared
the evaluated schedule rather than look into the results from the test
modules. Mainly the change is a refactoring with no visible impact on actual
test execution. However, in some cases the order of modules execution was
changed for either SLE or openSUSE to harmonize both.
Verification runs:
Related progress issue: https://progress.opensuse.org/issues/15132