1# SPDX-License-Identifier: GPL-2.0 2# Copyright (c) 2015 Stephen Warren 3# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 4 5import pytest 6 7def test_help(u_boot_console): 8 """Test that the "help" command can be executed.""" 9 10 u_boot_console.run_command('help') 11 12@pytest.mark.boardspec('sandbox') 13def test_help_no_devicetree(u_boot_console): 14 try: 15 cons = u_boot_console 16 cons.restart_uboot_with_flags([], use_dtb=False) 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() 23 24@pytest.mark.boardspec('sandbox_vpl') 25def test_vpl_help(u_boot_console): 26 try: 27 cons = u_boot_console 28 cons.restart_uboot() 29 cons.run_command('help') 30 output = cons.get_spawn_output().replace('\r', '') 31 assert 'print command description/usage' in output 32 finally: 33 # Restart afterward to get the normal device tree back 34 u_boot_console.restart_uboot() 35