[PATCH v2 7/8] test_ut: Drop support for fallback files
Simon Glass
sjg at chromium.org
Thu Nov 21 23:32:13 CET 2024
We don't need the fallback anymore. Remove the code which uses these
files.
Signed-off-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Richard Weinberger <richard at nod.at>
---
Changes in v2:
- Separate out patch to drop support for fallback files
test/py/tests/test_ut.py | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py
index 6c3b360d5fd..9b6b6b20c85 100644
--- a/test/py/tests/test_ut.py
+++ b/test/py/tests/test_ut.py
@@ -57,19 +57,6 @@ def setup_image(cons, devnum, part_type, img_size=20, second_part=False,
stdin=spec.encode('utf-8'))
return fname, mnt
-def copy_prepared_image(cons, devnum, fname, basename='mmc'):
- """Use a prepared image since we cannot create one
-
- Args:
- cons (ConsoleBase): Console touse
- devnum (int): device number
- fname (str): Filename of MMC image
- basename (str): Base name to use in the filename, e.g. 'mmc'
- """
- infname = os.path.join(cons.config.source_dir,
- f'test/py/tests/bootstd/{basename}{devnum}.img.xz')
- u_boot_utils.run_and_log(cons, ['sh', '-c', f'xz -dc {infname} >{fname}'])
-
def setup_bootmenu_image(cons):
"""Create a 20MB disk image with a single ext4 partition
@@ -78,7 +65,6 @@ def setup_bootmenu_image(cons):
mmc_dev = 4
fname, mnt = setup_image(cons, mmc_dev, 0x83)
- complete = False
script = '''# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
@@ -187,19 +173,14 @@ booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
u_boot_utils.run_and_log(cons, f'fallocate -l 18M {fsfile}')
u_boot_utils.run_and_log(cons, f'mkfs.ext4 {fsfile} -d {mnt}')
u_boot_utils.run_and_log(cons, f'dd if={fsfile} of={fname} bs=1M seek=1')
- complete = True
u_boot_utils.run_and_log(cons, f'rm -rf {mnt}')
u_boot_utils.run_and_log(cons, f'rm -f {fsfile}')
- if not complete:
- copy_prepared_image(cons, mmc_dev, fname)
-
def setup_bootflow_image(cons):
"""Create a 20MB disk image with a single FAT partition"""
mmc_dev = 1
fname, mnt = setup_image(cons, mmc_dev, 0xc, second_part=True)
- complete = False
vmlinux = 'vmlinuz-5.3.7-301.fc31.armv7hl'
initrd = 'initramfs-5.3.7-301.fc31.armv7hl.img'
dtbdir = 'dtb-5.3.7-301.fc31.armv7hl'
@@ -244,11 +225,8 @@ label Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl)
u_boot_utils.run_and_log(cons, f'mkfs.vfat {fsfile}')
u_boot_utils.run_and_log(cons, ['sh', '-c', f'mcopy -i {fsfile} {mnt}/* ::/'])
u_boot_utils.run_and_log(cons, f'dd if={fsfile} of={fname} bs=1M seek=1')
- complete = True
u_boot_utils.run_and_log(cons, f'rm -rf {mnt}')
u_boot_utils.run_and_log(cons, f'rm -f {fsfile}')
- if not complete:
- copy_prepared_image(cons, mmc_dev, fname)
def setup_cros_image(cons):
"""Create a 20MB disk image with ChromiumOS partitions"""
@@ -520,7 +498,6 @@ def setup_efi_image(cons):
fname, mnt = setup_image(cons, devnum, 0xc, second_part=True,
basename=basename)
- complete = False
efi_dir = os.path.join(mnt, 'EFI')
mkdir_cond(efi_dir)
bootdir = os.path.join(efi_dir, 'BOOT')
@@ -536,14 +513,9 @@ def setup_efi_image(cons):
u_boot_utils.run_and_log(cons, f'mkfs.vfat {fsfile}')
u_boot_utils.run_and_log(cons, ['sh', '-c', f'mcopy -vs -i {fsfile} {mnt}/* ::/'])
u_boot_utils.run_and_log(cons, f'dd if={fsfile} of={fname} bs=1M seek=1')
- complete = True
u_boot_utils.run_and_log(cons, f'rm -rf {mnt}')
u_boot_utils.run_and_log(cons, f'rm -f {fsfile}')
- if not complete:
- copy_prepared_image(cons, devnum, fname, basename)
-
-
@pytest.mark.buildconfigspec('cmd_bootflow')
@pytest.mark.buildconfigspec('sandbox')
def test_ut_dm_init_bootstd(u_boot_console):
--
2.43.0
More information about the U-Boot
mailing list