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