mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-21 04:14:34 +00:00
test: Check help output
The current test doesn't check anything about the output. If a bug results in junk before the output, this is not currently detected. Add a check for the first line being the one expected. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
190933fbb5
commit
f840a5b34c
1 changed files with 5 additions and 1 deletions
|
@ -7,7 +7,11 @@ import pytest
|
||||||
def test_help(u_boot_console):
|
def test_help(u_boot_console):
|
||||||
"""Test that the "help" command can be executed."""
|
"""Test that the "help" command can be executed."""
|
||||||
|
|
||||||
u_boot_console.run_command('help')
|
lines = u_boot_console.run_command('help')
|
||||||
|
if u_boot_console.config.buildconfig.get('config_cmd_2048', 'n') == 'y':
|
||||||
|
assert lines.splitlines()[0] == "2048 - The 2048 game"
|
||||||
|
else:
|
||||||
|
assert lines.splitlines()[0] == "? - alias for 'help'"
|
||||||
|
|
||||||
@pytest.mark.boardspec('sandbox')
|
@pytest.mark.boardspec('sandbox')
|
||||||
def test_help_no_devicetree(u_boot_console):
|
def test_help_no_devicetree(u_boot_console):
|
||||||
|
|
Loading…
Add table
Reference in a new issue