summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-07-17 21:21:00 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-07-22 13:32:42 +0300
commitc00183740097124502151409a6680522efc61e1e (patch)
treed6394c7540dc64de76750a8d027985efc7302fc8 /test
parentbf758125d826a5c09828b54c3d866490346f033c (diff)
downloadu-boot-c00183740097124502151409a6680522efc61e1e.tar.xz
efi_loader: use logging for bootefi command
Log messages of the bootefi command instead of simply printing them to the console. Do not show "## Application terminated" message when the UEFI binary completed successfully. Adjust the python tests testing for '## Application terminated'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_efi_fit.py9
-rw-r--r--test/py/tests/test_efi_loader.py9
2 files changed, 8 insertions, 10 deletions
diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py
index 06fb151c13..068a35a559 100644
--- a/test/py/tests/test_efi_fit.py
+++ b/test/py/tests/test_efi_fit.py
@@ -420,12 +420,11 @@ def test_efi_fit_launch(u_boot_console):
fit_config = 'config-efi-fdt' if enable_fdt else 'config-efi-nofdt'
# Try booting.
- cons.run_command(
- 'bootm %x#%s' % (addr, fit_config), wait_for_prompt=False)
+ output = cons.run_command('bootm %x#%s' % (addr, fit_config))
if enable_fdt:
- cons.wait_for('Booting using the fdt blob')
- cons.wait_for('Hello, world')
- cons.wait_for('## Application terminated, r = 0')
+ assert 'Booting using the fdt blob' in output
+ assert 'Hello, world' in output
+ assert '## Application failed' not in output
cons.restart_uboot()
cons = u_boot_console
diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index 7aa422e764..ca68626cec 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -161,8 +161,8 @@ def test_efi_helloworld_net(u_boot_console):
output = u_boot_console.run_command('bootefi %x' % addr)
expected_text = 'Hello, world'
assert expected_text in output
- expected_text = '## Application terminated, r = 0'
- assert expected_text in output
+ expected_text = '## Application failed'
+ assert expected_text not in output
@pytest.mark.buildconfigspec('cmd_bootefi_hello')
def test_efi_helloworld_builtin(u_boot_console):
@@ -198,8 +198,7 @@ def test_efi_grub_net(u_boot_console):
# Then exit cleanly
u_boot_console.wait_for('grub>')
- output = u_boot_console.run_command('exit', wait_for_prompt=False, wait_for_echo=False)
- u_boot_console.wait_for('r = 0')
-
+ u_boot_console.run_command('exit', wait_for_prompt=False, wait_for_echo=False)
+ u_boot_console.wait_for('=>')
# And give us our U-Boot prompt back
u_boot_console.run_command('')