]> git.sur5r.net Git - u-boot/blob - test/py/tests/test_000_version.py
imx: Fix missing spl_sd configuration for wandboard.
[u-boot] / test / py / tests / test_000_version.py
1 # Copyright (c) 2015 Stephen Warren
2 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3 #
4 # SPDX-License-Identifier: GPL-2.0
5
6 # pytest runs tests the order of their module path, which is related to the
7 # filename containing the test. This file is named such that it is sorted
8 # first, simply as a very basic sanity check of the functionality of the U-Boot
9 # command prompt.
10
11 def test_version(u_boot_console):
12     """Test that the "version" command prints the U-Boot version."""
13
14     # "version" prints the U-Boot sign-on message. This is usually considered
15     # an error, so that any unexpected reboot causes an error. Here, this
16     # error detection is disabled since the sign-on message is expected.
17     with u_boot_console.disable_check('main_signon'):
18         response = u_boot_console.run_command('version')
19     # Ensure "version" printed what we expected.
20     u_boot_console.validate_version_string_in_text(response)