blob: d262f0534efd145bdf8fe99f051ab70a0b4f45be [file] [log] [blame]
Stephen Warren10e50632016-01-15 11:15:24 -07001# 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
11def 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)