u-boot/test/py/tests/test_fs/test_fs_fat.py
Simon Glass 752c376987 test/py: Shorten u_boot_console
This fixture name is quite long and results in lots of verbose code.
We know this is U-Boot so the 'u_boot_' part is not necessary.

But it is also a bit of a misnomer, since it provides access to all the
information available to tests. It is not just the console.

It would be too confusing to use con as it would be confused with
config and it is probably too short.

So shorten it to 'ubman'.

Signed-off-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
2025-03-15 10:38:38 +00:00

25 lines
818 B
Python

# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2023 Weidmüller Interface GmbH & Co. KG
# Author: Christian Taedcke <christian.taedcke@weidmueller.com>
#
# U-Boot File System: FAT Test
"""
This test verifies fat specific file system behaviour.
"""
import pytest
import re
@pytest.mark.boardspec('sandbox')
@pytest.mark.slow
class TestFsFat(object):
def test_fs_fat1(self, ubman, fs_obj_fat):
"""Test that `fstypes` prints a result which includes `sandbox`."""
fs_type,fs_img = fs_obj_fat
with ubman.log.section('Test Case 1 - fatinfo'):
# Test Case 1 - ls
output = ubman.run_command_list([
'host bind 0 %s' % fs_img,
'fatinfo host 0:0'])
assert(re.search('Filesystem: %s' % fs_type.upper(), ''.join(output)))