1# SPDX-License-Identifier:      GPL-2.0+
2# Copyright (c) 2023 Weidmüller Interface GmbH & Co. KG
3# Author: Christian Taedcke <christian.taedcke@weidmueller.com>
4#
5# U-Boot File System: FAT Test
6
7"""
8This test verifies fat specific file system behaviour.
9"""
10
11import pytest
12import re
13
14@pytest.mark.boardspec('sandbox')
15@pytest.mark.slow
16class TestFsFat(object):
17    def test_fs_fat1(self, ubman, fs_obj_fat):
18        """Test that `fstypes` prints a result which includes `sandbox`."""
19        fs_type,fs_img = fs_obj_fat
20        with ubman.log.section('Test Case 1 - fatinfo'):
21            # Test Case 1 - ls
22            output = ubman.run_command_list([
23                'host bind 0 %s' % fs_img,
24                'fatinfo host 0:0'])
25            assert(re.search('Filesystem: %s' % fs_type.upper(), ''.join(output)))
26