Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Stephen Warren | 10e5063 | 2016-01-15 11:15:24 -0700 | [diff] [blame] | 2 | # Copyright (c) 2015 Stephen Warren |
| 3 | # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. |
Stephen Warren | 10e5063 | 2016-01-15 11:15:24 -0700 | [diff] [blame] | 4 | |
Simon Glass | e62205d | 2022-04-30 00:56:56 -0600 | [diff] [blame] | 5 | import pytest |
| 6 | |
Stephen Warren | 10e5063 | 2016-01-15 11:15:24 -0700 | [diff] [blame] | 7 | def test_help(u_boot_console): |
Stephen Warren | 75e731e | 2016-01-26 13:41:30 -0700 | [diff] [blame] | 8 | """Test that the "help" command can be executed.""" |
Stephen Warren | 10e5063 | 2016-01-15 11:15:24 -0700 | [diff] [blame] | 9 | |
| 10 | u_boot_console.run_command('help') |
Simon Glass | e62205d | 2022-04-30 00:56:56 -0600 | [diff] [blame] | 11 | |
| 12 | @pytest.mark.boardspec('sandbox_vpl') |
| 13 | def 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() |