diff --git a/lib/utils.pm b/lib/utils.pm index d304a76a..9bd17a0e 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -61,7 +61,19 @@ sub boot_to_login_screen { sleep 5; $count -= 1; } - assert_screen "login_screen", $args{timeout}; + assert_screen ["login_screen", "upgrade_complete"], $args{timeout}; + if (match_has_tag "upgrade_complete") { + # this is a workaround for RHBZ #1674045 during upgrades + # let's check we didn't just happen to catch it for the + # brief time it's displayed normally... + sleep 10; + if (check_screen "upgrade_complete") { + record_soft_failure "Upgrade hung at end - probably RHBZ #1674045"; + power 'reset'; + } + # now let's just assume we'll get to a graphical login screen soonish + assert_screen "login_screen", 300; + } if (match_has_tag "graphical_login") { wait_still_screen 10, 30; assert_screen "login_screen"; @@ -275,7 +287,20 @@ sub do_bootloader { sub boot_decrypt { # decrypt storage during boot; arg is timeout (in seconds) my $timeout = shift || 60; - assert_screen "boot_enter_passphrase", $timeout; + assert_screen ["boot_enter_passphrase", "upgrade_complete"], $timeout; + if (match_has_tag "upgrade_complete") { + # this is a workaround for RHBZ #1674045 during upgrades + # let's check we didn't just happen to catch it for the + # brief time it's displayed normally... + sleep 10; + if (check_screen "upgrade_complete") { + record_soft_failure "Upgrade hung at end - probably RHBZ #1674045"; + power 'reset'; + } + # now let's just assume we'll get to a graphical login screen soonish + assert_screen "boot_enter_passphrase", 300; + } + type_string get_var("ENCRYPT_PASSWORD"); send_key "ret"; } diff --git a/needles/console/upgrade_complete-graphical-20190305.json b/needles/console/upgrade_complete-graphical-20190305.json new file mode 100644 index 00000000..1a9fdd23 --- /dev/null +++ b/needles/console/upgrade_complete-graphical-20190305.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 8, + "ypos": 10, + "width": 159, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "upgrade_complete" + ] +} \ No newline at end of file diff --git a/needles/console/upgrade_complete-graphical-20190305.png b/needles/console/upgrade_complete-graphical-20190305.png new file mode 100644 index 00000000..fba8f2e2 Binary files /dev/null and b/needles/console/upgrade_complete-graphical-20190305.png differ diff --git a/needles/console/upgrade_complete-text-20190305.json b/needles/console/upgrade_complete-text-20190305.json new file mode 100644 index 00000000..ef407156 --- /dev/null +++ b/needles/console/upgrade_complete-text-20190305.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 321, + "ypos": 369, + "width": 137, + "height": 16, + "type": "match" + } + ], + "properties": [], + "tags": [ + "upgrade_complete" + ] +} \ No newline at end of file diff --git a/needles/console/upgrade_complete-text-20190305.png b/needles/console/upgrade_complete-text-20190305.png new file mode 100644 index 00000000..b16b16dc Binary files /dev/null and b/needles/console/upgrade_complete-text-20190305.png differ