2018-05-06 21:58:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2016-01-15 18:15:24 +00:00
|
|
|
# Copyright (c) 2015 Stephen Warren
|
|
|
|
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
|
2022-04-30 06:56:56 +00:00
|
|
|
import pytest
|
|
|
|
|
2016-01-15 18:15:24 +00:00
|
|
|
def test_help(u_boot_console):
|
2016-01-26 20:41:30 +00:00
|
|
|
"""Test that the "help" command can be executed."""
|
2016-01-15 18:15:24 +00:00
|
|
|
|
|
|
|
u_boot_console.run_command('help')
|
2022-04-30 06:56:56 +00:00
|
|
|
|
2022-04-27 19:47:57 +00:00
|
|
|
@pytest.mark.boardspec('sandbox')
|
|
|
|
def test_help_no_devicetree(u_boot_console):
|
|
|
|
try:
|
|
|
|
cons = u_boot_console
|
|
|
|
cons.restart_uboot_with_flags([], use_dtb=False)
|
|
|
|
cons.run_command('help')
|
|
|
|
output = cons.get_spawn_output().replace('\r', '')
|
|
|
|
assert 'print command description/usage' in output
|
|
|
|
finally:
|
|
|
|
# Restart afterward to get the normal device tree back
|
|
|
|
u_boot_console.restart_uboot()
|
|
|
|
|
2022-04-30 06:56:56 +00:00
|
|
|
@pytest.mark.boardspec('sandbox_vpl')
|
|
|
|
def test_vpl_help(u_boot_console):
|
|
|
|
try:
|
|
|
|
cons = u_boot_console
|
|
|
|
cons.restart_uboot()
|
|
|
|
cons.run_command('help')
|
|
|
|
output = cons.get_spawn_output().replace('\r', '')
|
|
|
|
assert 'print command description/usage' in output
|
|
|
|
finally:
|
|
|
|
# Restart afterward to get the normal device tree back
|
|
|
|
u_boot_console.restart_uboot()
|