blob: bac0a29f5a26c738c3d709b8cc73aad00114498a [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0
Stephen Warren10e50632016-01-15 11:15:24 -07002# Copyright (c) 2015 Stephen Warren
3# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
Stephen Warren10e50632016-01-15 11:15:24 -07004
Simon Glasse62205d2022-04-30 00:56:56 -06005import pytest
6
Stephen Warren10e50632016-01-15 11:15:24 -07007def test_help(u_boot_console):
Stephen Warren75e731e2016-01-26 13:41:30 -07008 """Test that the "help" command can be executed."""
Stephen Warren10e50632016-01-15 11:15:24 -07009
10 u_boot_console.run_command('help')
Simon Glasse62205d2022-04-30 00:56:56 -060011
12@pytest.mark.boardspec('sandbox_vpl')
13def test_vpl_help(u_boot_console):
14 try:
15 cons = u_boot_console
16 cons.restart_uboot()
17 cons.run_command('help')
18 output = cons.get_spawn_output().replace('\r', '')
19 assert 'print command description/usage' in output
20 finally:
21 # Restart afterward to get the normal device tree back
22 u_boot_console.restart_uboot()