diff options
Diffstat (limited to 'support/testing/tests/fs')
| -rw-r--r-- | support/testing/tests/fs/test_ext.py | 50 | ||||
| -rw-r--r-- | support/testing/tests/fs/test_iso9660.py | 102 | ||||
| -rw-r--r-- | support/testing/tests/fs/test_jffs2.py | 18 | ||||
| -rw-r--r-- | support/testing/tests/fs/test_squashfs.py | 12 | ||||
| -rw-r--r-- | support/testing/tests/fs/test_ubi.py | 16 | ||||
| -rw-r--r-- | support/testing/tests/fs/test_yaffs2.py | 6 |
6 files changed, 103 insertions, 101 deletions
diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py index 0832ba4ce2..49bce45dc8 100644 --- a/support/testing/tests/fs/test_ext.py +++ b/support/testing/tests/fs/test_ext.py @@ -39,12 +39,12 @@ def boot_img_and_check_fs_type(emulator, builddir, fs_type): class TestExt2(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_2r0=y -BR2_TARGET_ROOTFS_EXT2_LABEL="foobaz" -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_2r0=y + BR2_TARGET_ROOTFS_EXT2_LABEL="foobaz" + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): out = dumpe2fs_run(self.builddir, "rootfs.ext2") @@ -57,12 +57,12 @@ BR2_TARGET_ROOTFS_EXT2_LABEL="foobaz" class TestExt2r1(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_2r1=y -BR2_TARGET_ROOTFS_EXT2_LABEL="foobar" -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_2r1=y + BR2_TARGET_ROOTFS_EXT2_LABEL="foobar" + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): out = dumpe2fs_run(self.builddir, "rootfs.ext2") @@ -76,11 +76,11 @@ BR2_TARGET_ROOTFS_EXT2_LABEL="foobar" class TestExt3(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_3=y -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_3=y + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): out = dumpe2fs_run(self.builddir, "rootfs.ext3") @@ -94,14 +94,14 @@ BR2_TARGET_ROOTFS_EXT2_3=y class TestExt4(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_ROOTFS_EXT2_SIZE="16384" -BR2_TARGET_ROOTFS_EXT2_INODES=3000 -BR2_TARGET_ROOTFS_EXT2_RESBLKS=10 -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_4=y + BR2_TARGET_ROOTFS_EXT2_SIZE="16384" + BR2_TARGET_ROOTFS_EXT2_INODES=3000 + BR2_TARGET_ROOTFS_EXT2_RESBLKS=10 + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): out = dumpe2fs_run(self.builddir, "rootfs.ext4") diff --git a/support/testing/tests/fs/test_iso9660.py b/support/testing/tests/fs/test_iso9660.py index e804808c96..60dcbdc139 100644 --- a/support/testing/tests/fs/test_iso9660.py +++ b/support/testing/tests/fs/test_iso9660.py @@ -3,27 +3,27 @@ import os import infra.basetest BASIC_CONFIG = \ -""" -BR2_x86_pentium4=y -BR2_TOOLCHAIN_EXTERNAL=y -BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y -BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y -BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2015.05-496-g85945aa.tar.bz2" -BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y -BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2=y -BR2_TOOLCHAIN_EXTERNAL_LOCALE=y -# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set -BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y -BR2_TOOLCHAIN_EXTERNAL_CXX=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" -BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.0" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}" -# BR2_TARGET_ROOTFS_TAR is not set -""".format(infra.filepath("conf/minimal-x86-qemu-kernel.config")) + """ + BR2_x86_pentium4=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2015.05-496-g85945aa.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2=y + BR2_TOOLCHAIN_EXTERNAL_LOCALE=y + # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set + BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.0" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}" + # BR2_TARGET_ROOTFS_TAR is not set + """.format(infra.filepath("conf/minimal-x86-qemu-kernel.config")) def test_mount_internal_external(emulator, builddir, internal=True): img = os.path.join(builddir, "images", "rootfs.iso9660") @@ -48,14 +48,14 @@ def test_touch_file(emulator): class TestIso9660Grub2External(infra.basetest.BRTest): config = BASIC_CONFIG + \ -""" -BR2_TARGET_ROOTFS_ISO9660=y -# BR2_TARGET_ROOTFS_ISO9660_INITRD is not set -BR2_TARGET_GRUB2=y -BR2_TARGET_GRUB2_BOOT_PARTITION="cd" -BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" -BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" -""".format(infra.filepath("conf/grub2.cfg")) + """ + BR2_TARGET_ROOTFS_ISO9660=y + # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set + BR2_TARGET_GRUB2=y + BR2_TARGET_GRUB2_BOOT_PARTITION="cd" + BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + """.format(infra.filepath("conf/grub2.cfg")) def test_run(self): exit_code = test_mount_internal_external(self.emulator, @@ -67,14 +67,14 @@ BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" class TestIso9660Grub2Internal(infra.basetest.BRTest): config = BASIC_CONFIG + \ -""" -BR2_TARGET_ROOTFS_ISO9660=y -BR2_TARGET_ROOTFS_ISO9660_INITRD=y -BR2_TARGET_GRUB2=y -BR2_TARGET_GRUB2_BOOT_PARTITION="cd" -BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" -BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" -""".format(infra.filepath("conf/grub2.cfg")) + """ + BR2_TARGET_ROOTFS_ISO9660=y + BR2_TARGET_ROOTFS_ISO9660_INITRD=y + BR2_TARGET_GRUB2=y + BR2_TARGET_GRUB2_BOOT_PARTITION="cd" + BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + """.format(infra.filepath("conf/grub2.cfg")) def test_run(self): exit_code = test_mount_internal_external(self.emulator, @@ -90,13 +90,13 @@ BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" class TestIso9660SyslinuxExternal(infra.basetest.BRTest): config = BASIC_CONFIG + \ -""" -BR2_TARGET_ROOTFS_ISO9660=y -# BR2_TARGET_ROOTFS_ISO9660_INITRD is not set -BR2_TARGET_ROOTFS_ISO9660_HYBRID=y -BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" -BR2_TARGET_SYSLINUX=y -""".format(infra.filepath("conf/isolinux.cfg")) + """ + BR2_TARGET_ROOTFS_ISO9660=y + # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set + BR2_TARGET_ROOTFS_ISO9660_HYBRID=y + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + BR2_TARGET_SYSLINUX=y + """.format(infra.filepath("conf/isolinux.cfg")) def test_run(self): exit_code = test_mount_internal_external(self.emulator, @@ -108,13 +108,13 @@ BR2_TARGET_SYSLINUX=y class TestIso9660SyslinuxInternal(infra.basetest.BRTest): config = BASIC_CONFIG + \ -""" -BR2_TARGET_ROOTFS_ISO9660=y -BR2_TARGET_ROOTFS_ISO9660_INITRD=y -BR2_TARGET_ROOTFS_ISO9660_HYBRID=y -BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" -BR2_TARGET_SYSLINUX=y -""".format(infra.filepath("conf/isolinux.cfg")) + """ + BR2_TARGET_ROOTFS_ISO9660=y + BR2_TARGET_ROOTFS_ISO9660_INITRD=y + BR2_TARGET_ROOTFS_ISO9660_HYBRID=y + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + BR2_TARGET_SYSLINUX=y + """.format(infra.filepath("conf/isolinux.cfg")) def test_run(self): exit_code = test_mount_internal_external(self.emulator, diff --git a/support/testing/tests/fs/test_jffs2.py b/support/testing/tests/fs/test_jffs2.py index 7185df7899..a84c858238 100644 --- a/support/testing/tests/fs/test_jffs2.py +++ b/support/testing/tests/fs/test_jffs2.py @@ -12,15 +12,15 @@ def jffs2dump_find_file(files_list, fname): class TestJffs2(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y -BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x80000 -BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y -BR2_TARGET_ROOTFS_JFFS2_PAD=y -BR2_TARGET_ROOTFS_JFFS2_PADSIZE=0x4000000 -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + BR2_TARGET_ROOTFS_JFFS2=y + BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y + BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x80000 + BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y + BR2_TARGET_ROOTFS_JFFS2_PAD=y + BR2_TARGET_ROOTFS_JFFS2_PADSIZE=0x4000000 + # BR2_TARGET_ROOTFS_TAR is not set + """ # TODO: there are some scary JFFS2 messages when one starts to # write files in the rootfs: "jffs2: Newly-erased block contained diff --git a/support/testing/tests/fs/test_squashfs.py b/support/testing/tests/fs/test_squashfs.py index b205b6a55a..9fad28f834 100644 --- a/support/testing/tests/fs/test_squashfs.py +++ b/support/testing/tests/fs/test_squashfs.py @@ -5,12 +5,12 @@ import infra.basetest class TestSquashfs(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_SQUASHFS=y -# BR2_TARGET_ROOTFS_SQUASHFS4_GZIP is not set -BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + BR2_TARGET_ROOTFS_SQUASHFS=y + # BR2_TARGET_ROOTFS_SQUASHFS4_GZIP is not set + BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): unsquashfs_cmd = ["host/bin/unsquashfs", "-s", "images/rootfs.squashfs"] diff --git a/support/testing/tests/fs/test_ubi.py b/support/testing/tests/fs/test_ubi.py index ede4999aa1..360932a0bf 100644 --- a/support/testing/tests/fs/test_ubi.py +++ b/support/testing/tests/fs/test_ubi.py @@ -5,14 +5,14 @@ import infra.basetest class TestUbi(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_TARGET_ROOTFS_UBIFS=y -BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x7ff80 -BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1 -BR2_TARGET_ROOTFS_UBI=y -BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x80000 -BR2_TARGET_ROOTFS_UBI_SUBSIZE=1 -""" + """ + BR2_TARGET_ROOTFS_UBIFS=y + BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x7ff80 + BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1 + BR2_TARGET_ROOTFS_UBI=y + BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x80000 + BR2_TARGET_ROOTFS_UBI_SUBSIZE=1 + """ # TODO: if you boot Qemu twice on the same UBI image, it fails to # attach the image the second time, with "ubi0 error: diff --git a/support/testing/tests/fs/test_yaffs2.py b/support/testing/tests/fs/test_yaffs2.py index 0ffb758083..a11c1a40a7 100644 --- a/support/testing/tests/fs/test_yaffs2.py +++ b/support/testing/tests/fs/test_yaffs2.py @@ -4,8 +4,10 @@ import infra.basetest class TestYaffs2(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ - infra.basetest.MINIMAL_CONFIG + \ - "BR2_TARGET_ROOTFS_YAFFS2=y" + infra.basetest.MINIMAL_CONFIG + \ + """ + BR2_TARGET_ROOTFS_YAFFS2=y + """ def test_run(self): img = os.path.join(self.builddir, "images", "rootfs.yaffs2") |

