#79 Avoid unconditional wait for Timbuktu screen in _boot_to_anaconda
Merged 5 years ago by adamwill. Opened 5 years ago by adamwill.

file modified
+15 -4
@@ -62,11 +62,22 @@ 

              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; #

          }

      }

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 awilliam@redhat.com

@lruzicka I primarily filed this as a PR so you can see it, just a familiarization thing. Although I constantly screw up perl, and didn't test it yet, so it's entirely possible it's broken. :P Please take a look and let me know what you think, ask questions if there's anything here you don't understand, etc. Thanks!

rebased onto 06fbeca

5 years ago

@adamwill It looks good to me. I suppose that this line
(check_screen ["anaconda_rawhide_accept_fate", "anaconda_main_hub"], 60) expects one of the needles to come in 60 seconds, be it the first one, or the second, right? The rest depends on the result of the above. I think it should work. Who does usually merge that? Your or the reviewer?

I guess I was sorta expecting I'd wind up merging it, but I don't think we have rules / policy written down anywhere, maybe we should sort something out. I'll merge this and check it works on staging.

Yes, if you pass an array ref to check_screen or assert_screen, it'll match on any of the tags in the array. Any time you call match_has_tag it will return 1 if the last needle matched by any needle-matching call had that tag, 0 if it didn't, and undef if there wasn't any needle match before the call to match_has_tag. It's typically only useful after this kind of array match, of course.

Pull-Request has been merged by adamwill

5 years ago

Thanks for the info and happy merging.

Metadata