blob: b95ceae23465b8595aff82663dbfb1941fe758c6 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0
Stephen Warren10e50632016-01-15 11:15:24 -07002# Copyright (c) 2015 Stephen Warren
3# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
Stephen Warren10e50632016-01-15 11:15:24 -07004
5# pytest runs tests the order of their module path, which is related to the
6# filename containing the test. This file is named such that it is sorted
7# first, simply as a very basic sanity check of the functionality of the U-Boot
8# command prompt.
9
Simon Glassddba5202025-02-09 09:07:14 -070010def test_version(ubman):
Stephen Warren75e731e2016-01-26 13:41:30 -070011 """Test that the "version" command prints the U-Boot version."""
Stephen Warren10e50632016-01-15 11:15:24 -070012
13 # "version" prints the U-Boot sign-on message. This is usually considered
14 # an error, so that any unexpected reboot causes an error. Here, this
15 # error detection is disabled since the sign-on message is expected.
Simon Glassddba5202025-02-09 09:07:14 -070016 with ubman.disable_check('main_signon'):
17 response = ubman.run_command('version')
Stephen Warren10e50632016-01-15 11:15:24 -070018 # Ensure "version" printed what we expected.
Simon Glassddba5202025-02-09 09:07:14 -070019 ubman.validate_version_string_in_text(response)