From 008b47bd6b214be278b569743788a7ecea232175 Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Fri, 19 Dec 2025 22:09:56 +0100 Subject: [PATCH] support/testing: ddrescue: use f-string for test config Signed-off-by: Julien Olivain Signed-off-by: Thomas Petazzoni (cherry picked from commit c3d5f2c25480693bc6915b44b36e99b9febc371b) Signed-off-by: Thomas Perale --- support/testing/tests/package/test_ddrescue.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/support/testing/tests/package/test_ddrescue.py b/support/testing/tests/package/test_ddrescue.py index 042431eb7b..ff2af80cfa 100644 --- a/support/testing/tests/package/test_ddrescue.py +++ b/support/testing/tests/package/test_ddrescue.py @@ -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.1.15" 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")