test: Deal with the silent menu in grub
The distro test for EFI in the EFI ARM app is currently flaky. If the test does not send an 'escape' character, then the board may boot straight into Ubuntu. If it does, but didn't need to, then grub sits at the command prompt. Handle this by pressing escape twice (which should always go to the grub command line), then using the 'normal' command to start the menu. Series-to: concept Series-cc: heinrich Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -106,13 +106,20 @@ def test_distro_arm_app_efi(ubman):
|
||||
["Booting bootflow 'efi_media_1.bootdev.part_1' with efi"])
|
||||
|
||||
# Press Escape to force GRUB to appear, even if the silent menu was
|
||||
# enabled by a previous boot
|
||||
# enabled by a previous boot. If the menu is already set to appear, this
|
||||
# will exit to the grub> prompt
|
||||
ubman.send('\x1b')
|
||||
|
||||
# Press Escape again, to force it to the grub> prompt
|
||||
ubman.send('\x1b')
|
||||
|
||||
# Wait until we see the editor appear
|
||||
with ubman.log.section('grub'):
|
||||
ubman.expect(['grub>'])
|
||||
|
||||
ubman.run_command('normal', wait_for_prompt=False)
|
||||
|
||||
ubman.expect(['ESC to return previous'])
|
||||
# ubman.expect(['The highlighted entry will be executed automatically in 29s'])
|
||||
|
||||
# Press 'e' to edit the command line
|
||||
ubman.log.info("Pressing 'e'")
|
||||
|
||||
Reference in New Issue
Block a user