From 06fbeca28136c8467d2fc5b9572c85b1839e57f7 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 24 2018 21:18:21 +0000 Subject: Avoid unconditional wait for Timbuktu screen in _boot_to_anaconda The way this currently works, the test unconditionally waits 60 seconds for the "Timbuktu screen" (the warning dialog shown on pre-release images) to appear when anaconda is starting up, even if it's testing an image where it doesn't show up. Now we test Atomic nightlies and live respins and stuff this happens quite a lot, so let's avoid it. This way if the hub appears during those 60 seconds we'll spot it right away and continue, otherwise we behave the same as before. Signed-off-by: Adam Williamson --- diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index a984e9c..59c7ef0 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -62,11 +62,22 @@ sub run { assert_screen "anaconda_select_install_lang_selected", 3; assert_and_click "anaconda_select_install_lang_continue"; - if ( check_screen "anaconda_rawhide_accept_fate", 60 ) { - assert_and_click "anaconda_rawhide_accept_fate"; + # wait 60 secs for hub or Rawhide warning dialog to appear. + # If the hub appears, return - we're done now. If Rawhide + # warning dialog appears, accept it. + if (check_screen ["anaconda_rawhide_accept_fate", "anaconda_main_hub"], 60) { + if (match_has_tag("anaconda_rawhide_accept_fate")) { + assert_and_click "anaconda_rawhide_accept_fate"; + } + else { + # this is when the hub appeared already, we're done + return; + } } - - # wait for Anaconda hub to appear + # This is where we get to if we accepted fate above, *or* + # didn't match anything: if the Rawhide warning didn't + # show by now it never will, so we'll just wait for the + # hub to show up. assert_screen "anaconda_main_hub", 900; # } }