support/testing: ddrescue: use f-string for test config

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Julien Olivain
2025-12-19 22:09:56 +01:00
committed by Thomas Petazzoni
parent 289b5aab18
commit c3d5f2c254

View File

@@ -10,8 +10,10 @@ class TestDdrescue(infra.basetest.BRTest):
# mapper dm-dust, which are used to simulate a failing storage
# block device.
# - lvm2 user space package is needed to configure dm-dust with dmsetup
kernel_fragment = \
infra.filepath("tests/package/test_ddrescue/linux-ddrescue.fragment")
config = \
"""
f"""
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
@@ -20,16 +22,14 @@ class TestDdrescue(infra.basetest.BRTest):
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.2"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kernel_fragment}"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_DDRESCUE=y
BR2_PACKAGE_LVM2=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_GZIP=y
# BR2_TARGET_ROOTFS_TAR is not set
""".format(
infra.filepath("tests/package/test_ddrescue/linux-ddrescue.fragment")
)
"""
def test_run(self):
img = os.path.join(self.builddir, "images", "rootfs.cpio.gz")