aboutsummaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-24 13:55:38 -0600
committerTom Rini <trini@konsulko.com>2023-08-25 17:55:19 -0400
commit00613bc19af01b3ef37aeb836630bae8d11e7991 (patch)
treece30e69d83b6584beb06d9445f61af4b4fc3eb32 /test/py
parente2d22f782297bcec8b0b55d15b9a04e92bd4ea83 (diff)
test: Move 1MB.fat32.img and 2MB.ext2.img
These are currently created in the source directory, which is not ideal. Move them to the persistent-data directory instead. Update the test so skip validating the filename, since it now includes a full path. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/fs_helper.py6
-rw-r--r--test/py/tests/test_ut.py6
2 files changed, 4 insertions, 8 deletions
diff --git a/test/py/tests/fs_helper.py b/test/py/tests/fs_helper.py
index 17151bcd08..9882ddb1da 100644
--- a/test/py/tests/fs_helper.py
+++ b/test/py/tests/fs_helper.py
@@ -9,7 +9,7 @@ import re
import os
from subprocess import call, check_call, check_output, CalledProcessError
-def mk_fs(config, fs_type, size, prefix, use_src_dir=False):
+def mk_fs(config, fs_type, size, prefix):
"""Create a file system volume
Args:
@@ -17,14 +17,12 @@ def mk_fs(config, fs_type, size, prefix, use_src_dir=False):
fs_type (str): File system type, e.g. 'ext4'
size (int): Size of file system in bytes
prefix (str): Prefix string of volume's file name
- use_src_dir (bool): true to put the file in the source directory
Raises:
CalledProcessError: if any error occurs when creating the filesystem
"""
fs_img = f'{prefix}.{fs_type}.img'
- fs_img = os.path.join(config.source_dir if use_src_dir
- else config.persistent_data_dir, fs_img)
+ fs_img = os.path.join(config.persistent_data_dir, fs_img)
if fs_type == 'fat16':
mkfs_opt = '-F 16'
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py
index 6a59c30632..640129018c 100644
--- a/test/py/tests/test_ut.py
+++ b/test/py/tests/test_ut.py
@@ -319,10 +319,8 @@ def test_ut_dm_init(u_boot_console):
u_boot_utils.run_and_log(
u_boot_console, f'sfdisk {fn}', stdin=b'type=83')
- fs_helper.mk_fs(u_boot_console.config, 'ext2', 0x200000, '2MB',
- use_src_dir=True)
- fs_helper.mk_fs(u_boot_console.config, 'fat32', 0x100000, '1MB',
- use_src_dir=True)
+ fs_helper.mk_fs(u_boot_console.config, 'ext2', 0x200000, '2MB')
+ fs_helper.mk_fs(u_boot_console.config, 'fat32', 0x100000, '1MB')
@pytest.mark.buildconfigspec('cmd_bootflow')
def test_ut_dm_init_bootstd(u_boot_console):