-
Notifications
You must be signed in to change notification settings - Fork 266
/
upgrade_select_opensuse.pm
72 lines (63 loc) · 2.05 KB
/
upgrade_select_opensuse.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# SUSE's openQA tests
#
# Copyright © 2009-2013 Bernhard M. Wiedemann
# Copyright © 2012-2018 SUSE LLC
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
# Summary: openSUSE specific part of upgrade_select
# Maintainer: Ludwig Nussel <ludwig.nussel@suse.de>
use strict;
use base "y2logsstep";
use testapi;
# Check that installer does not freeze when pressing next
sub check_bsc997635 {
my $ret = wait_screen_change(sub { send_key $cmd{next}; }, 10);
if (!$ret) {
record_soft_failure 'bsc#997635';
sleep 30;
}
}
sub handle_beta_warning {
if (!get_var("BETA")) {
die "Beta warning in non beta product";
}
send_key 'alt-o';
}
sub run {
# offline DVD upgrade may not have network (boo#995771)
if (!check_var("FLAVOR", "NET") && check_screen('network-not-configured', 30)) {
send_key $cmd{next};
assert_screen('ERROR-cannot-download-repositories');
send_key 'alt-o';
}
else {
assert_screen('list-of-online-repositories', 10);
send_key $cmd{next};
if (check_screen('inst-betawarning', 30)) {
handle_beta_warning;
}
elsif (get_var("BETA")) {
die 'missing beta warning even though BETA is set';
}
# Bug 881107 - there is 2nd license agreement screen in openSUSE upgrade
# http://bugzilla.opensuse.org/show_bug.cgi?id=881107
if (check_screen('upgrade-license-agreement', 30)) {
check_bsc997635;
}
}
if (check_screen(["installed-product-incompatible", "inst-betawarning"], 10)) {
if (match_has_tag 'installed-product-incompatible') {
record_info 'installed product incompatible', result => 'fail';
send_key 'alt-o';
}
else {
handle_beta_warning;
}
}
assert_screen "update-installation-overview", 60;
}
sub post_fail_hook {}
1;