public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader
@ 2017-08-06 16:10 Rob Clark
  2017-08-06 18:54 ` Mark Kettenis
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rob Clark @ 2017-08-06 16:10 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
Kinda works, but since we don't have an 'exit' command like grub, we
have to reboot, which leaves the "board" in a bad state (I guess,
since the next test fails).  I haven't tackled the travis bits to get
travis to download OpenBSD's bootloader, or other little details like
that.

So suggestions welcome ;-)

 test/py/tests/test_efi_loader.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index 5d7f5dbfb2..376f6442a3 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -193,3 +193,22 @@ def test_efi_grub_net(u_boot_console):
 
     # And give us our U-Boot prompt back
     u_boot_console.run_command('')
+
+ at pytest.mark.buildconfigspec('cmd_bootefi')
+def test_efi_openbsd_net(u_boot_console):
+    """Run OpenBSD's bootloader via TFTP.
+
+    The bootaa64.efi file is downloaded from the TFTP server and
+    gets executed.
+    """
+
+    addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_openbsd_file')
+
+    u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False)
+
+    # Check that bootloader loads properly:
+    u_boot_console.wait_for('boot>')
+
+    # There is no exit, but there is a reboot cmd.. maybe we need to do
+    # more than this to get u-boot running again??
+    u_boot_console.run_command('reboot', wait_for_prompt=False, wait_for_echo=False)
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-11  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-06 16:10 [U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader Rob Clark
2017-08-06 18:54 ` Mark Kettenis
2017-08-06 19:06   ` Rob Clark
2017-08-10  3:43     ` Jonathan Gray
2017-08-10 10:41       ` Rob Clark
2017-08-07 16:25 ` Stephen Warren
2017-08-11  9:46 ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox