imx8m: config: convert to bootm_size
[platform/kernel/u-boot.git] / test / py / tests / test_fs / test_squashfs / test_sqfs_ls.py
1 # SPDX-License-Identifier: GPL-2.0
2 # Copyright (C) 2020 Bootlin
3 # Author: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4
5 import os
6 import pytest
7 from sqfs_common import *
8
9 @pytest.mark.boardspec('sandbox')
10 @pytest.mark.buildconfigspec('cmd_fs_generic')
11 @pytest.mark.buildconfigspec('cmd_squashfs')
12 @pytest.mark.buildconfigspec('fs_squashfs')
13 @pytest.mark.requiredtool('mksquashfs')
14 def test_sqfs_ls(u_boot_console):
15     cons = u_boot_console
16     sqfs_generate_image(cons)
17     path = os.path.join(cons.config.build_dir, "sqfs")
18     try:
19         output = u_boot_console.run_command("host bind 0 " + path)
20         output = u_boot_console.run_command("sqfsls host 0")
21         assert "4 file(s), 0 dir(s)" in output
22         assert "<SYM>   sym" in output
23         output = u_boot_console.run_command("sqfsls host 0 xxx")
24         assert "** Cannot find directory. **" in output
25     except:
26         sqfs_clean(cons)
27     sqfs_clean(cons)