summaryrefslogtreecommitdiff
path: root/test/py/tests/test_bootmenu.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-03-15 08:19:31 -0600
committerTom Rini <trini@konsulko.com>2025-03-15 08:19:31 -0600
commit0e1fc465fea62ebae91f2f56cb823e8b37ee1077 (patch)
tree14ea0ca0ef443959df1ac5afa7b5114e6910bf77 /test/py/tests/test_bootmenu.py
parent00dfb7038ea4dfe9d9667143bfecd11c05cab6fa (diff)
parent13e8d14442a85a8556211a9950a5b6f80b447901 (diff)
Merge tag 'dm-pull-15mar25' of git://git.denx.de/u-boot-dm into next
Sync up on test renames
Diffstat (limited to 'test/py/tests/test_bootmenu.py')
-rw-r--r--test/py/tests/test_bootmenu.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/py/tests/test_bootmenu.py b/test/py/tests/test_bootmenu.py
index 70f51de699f..66f3fb8a131 100644
--- a/test/py/tests/test_bootmenu.py
+++ b/test/py/tests/test_bootmenu.py
@@ -5,42 +5,42 @@
import pytest
@pytest.mark.buildconfigspec('cmd_bootmenu')
-def test_bootmenu(u_boot_console):
+def test_bootmenu(ubman):
"""Test bootmenu
- u_boot_console -- U-Boot console
+ ubman -- U-Boot console
"""
- with u_boot_console.temporary_timeout(500):
- u_boot_console.run_command('setenv bootmenu_default 1')
- u_boot_console.run_command('setenv bootmenu_0 test 1=echo ok 1')
- u_boot_console.run_command('setenv bootmenu_1 test 2=echo ok 2')
- u_boot_console.run_command('setenv bootmenu_2 test 3=echo ok 3')
- u_boot_console.run_command('bootmenu 2', wait_for_prompt=False)
+ with ubman.temporary_timeout(500):
+ ubman.run_command('setenv bootmenu_default 1')
+ ubman.run_command('setenv bootmenu_0 test 1=echo ok 1')
+ ubman.run_command('setenv bootmenu_1 test 2=echo ok 2')
+ ubman.run_command('setenv bootmenu_2 test 3=echo ok 3')
+ ubman.run_command('bootmenu 2', wait_for_prompt=False)
for i in ('U-Boot Boot Menu', 'test 1', 'test 2', 'test 3', 'autoboot'):
- u_boot_console.p.expect([i])
+ ubman.p.expect([i])
# Press enter key to execute default entry
- response = u_boot_console.run_command(cmd='\x0d', wait_for_echo=False, send_nl=False)
+ response = ubman.run_command(cmd='\x0d', wait_for_echo=False, send_nl=False)
assert 'ok 2' in response
- u_boot_console.run_command('bootmenu 2', wait_for_prompt=False)
- u_boot_console.p.expect(['autoboot'])
+ ubman.run_command('bootmenu 2', wait_for_prompt=False)
+ ubman.p.expect(['autoboot'])
# Press up key to select prior entry followed by the enter key
- response = u_boot_console.run_command(cmd='\x1b\x5b\x41\x0d', wait_for_echo=False,
+ response = ubman.run_command(cmd='\x1b\x5b\x41\x0d', wait_for_echo=False,
send_nl=False)
assert 'ok 1' in response
- u_boot_console.run_command('bootmenu 2', wait_for_prompt=False)
- u_boot_console.p.expect(['autoboot'])
+ ubman.run_command('bootmenu 2', wait_for_prompt=False)
+ ubman.p.expect(['autoboot'])
# Press down key to select next entry followed by the enter key
- response = u_boot_console.run_command(cmd='\x1b\x5b\x42\x0d', wait_for_echo=False,
+ response = ubman.run_command(cmd='\x1b\x5b\x42\x0d', wait_for_echo=False,
send_nl=False)
assert 'ok 3' in response
- u_boot_console.run_command('bootmenu 2; echo rc:$?', wait_for_prompt=False)
- u_boot_console.p.expect(['autoboot'])
+ ubman.run_command('bootmenu 2; echo rc:$?', wait_for_prompt=False)
+ ubman.p.expect(['autoboot'])
# Press the escape key
- response = u_boot_console.run_command(cmd='\x1b', wait_for_echo=False, send_nl=False)
+ response = ubman.run_command(cmd='\x1b', wait_for_echo=False, send_nl=False)
assert 'ok' not in response
assert 'rc:0' in response
- u_boot_console.run_command('setenv bootmenu_default')
- u_boot_console.run_command('setenv bootmenu_0')
- u_boot_console.run_command('setenv bootmenu_1')
- u_boot_console.run_command('setenv bootmenu_2')
+ ubman.run_command('setenv bootmenu_default')
+ ubman.run_command('setenv bootmenu_0')
+ ubman.run_command('setenv bootmenu_1')
+ ubman.run_command('setenv bootmenu_2')