from infra.emulator import Emulator
BASIC_TOOLCHAIN_CONFIG = \
-"""
-BR2_arm=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-arm-full-2015.05-1190-g4a48479.tar.bz2"
-BR2_TOOLCHAIN_EXTERNAL_GCC_4_7=y
-BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=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_arm=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-arm-full-2015.05-1190-g4a48479.tar.bz2"
+ BR2_TOOLCHAIN_EXTERNAL_GCC_4_7=y
+ BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=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
+ """
MINIMAL_CONFIG = \
-"""
-BR2_INIT_NONE=y
-BR2_SYSTEM_BIN_SH_NONE=y
-# BR2_PACKAGE_BUSYBOX is not set
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ """
+ BR2_INIT_NONE=y
+ BR2_SYSTEM_BIN_SH_NONE=y
+ # BR2_PACKAGE_BUSYBOX is not set
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
class BRTest(unittest.TestCase):
config = None
class TestPostScripts(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
-"""
-BR2_INIT_NONE=y
-BR2_SYSTEM_BIN_SH_NONE=y
-# BR2_PACKAGE_BUSYBOX is not set
-BR2_ROOTFS_POST_BUILD_SCRIPT="{}"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="{}"
-BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz"
-""".format(infra.filepath("tests/core/post-build.sh"),
- infra.filepath("tests/core/post-image.sh"))
+ """
+ BR2_INIT_NONE=y
+ BR2_SYSTEM_BIN_SH_NONE=y
+ # BR2_PACKAGE_BUSYBOX is not set
+ BR2_ROOTFS_POST_BUILD_SCRIPT="{}"
+ BR2_ROOTFS_POST_IMAGE_SCRIPT="{}"
+ BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz"
+ """.format(infra.filepath("tests/core/post-build.sh"),
+ infra.filepath("tests/core/post-image.sh"))
def check_post_log_file(self, path, what):
lines = {}
class TestRootfsOverlay(infra.basetest.BRTest):
rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay")
- rootfs_overlay = "BR2_ROOTFS_OVERLAY=\"{0}1 {0}2\"".format(rootfs_overlay_path)
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
- infra.basetest.MINIMAL_CONFIG + \
- rootfs_overlay
+ infra.basetest.MINIMAL_CONFIG + \
+ """
+ BR2_ROOTFS_OVERLAY="{0}1 {0}2"
+ """.format(rootfs_overlay_path)
def test_run(self):
target_file = os.path.join(self.builddir, "target", "test-file1")
class TestNoTimezone(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
- """
-# BR2_TARGET_TZ_INFO is not set
-BR2_TARGET_ROOTFS_CPIO=y
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ """
+ # BR2_TARGET_TZ_INFO is not set
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
def test_run(self):
boot_armv5_cpio(self.emulator, self.builddir)
self.assertEqual(tz[0].strip(), "UTC")
class TestGlibcAllTimezone(infra.basetest.BRTest):
- config = """
-BR2_arm=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TARGET_TZ_INFO=y
-BR2_TARGET_ROOTFS_CPIO=y
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ config = \
+ """
+ BR2_arm=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TARGET_TZ_INFO=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
def test_run(self):
boot_armv5_cpio(self.emulator, self.builddir)
self.assertEqual(tz[0].strip(), "CET")
class TestGlibcNonDefaultLimitedTimezone(infra.basetest.BRTest):
- config = """
-BR2_arm=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TARGET_TZ_INFO=y
-BR2_TARGET_TZ_ZONELIST="northamerica"
-BR2_TARGET_LOCALTIME="America/New_York"
-BR2_TARGET_ROOTFS_CPIO=y
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ config = \
+ """
+ BR2_arm=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TARGET_TZ_INFO=y
+ BR2_TARGET_TZ_ZONELIST="northamerica"
+ BR2_TARGET_LOCALTIME="America/New_York"
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
def test_run(self):
boot_armv5_cpio(self.emulator, self.builddir)
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")
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")
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")
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")
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")
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,
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,
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,
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,
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
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"]
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:
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")
class TestDropbear(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
-"""
-BR2_TARGET_GENERIC_ROOT_PASSWD="testpwd"
-BR2_SYSTEM_DHCP="eth0"
-BR2_PACKAGE_DROPBEAR=y
-BR2_TARGET_ROOTFS_CPIO=y
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ """
+ BR2_TARGET_GENERIC_ROOT_PASSWD="testpwd"
+ BR2_SYSTEM_DHCP="eth0"
+ BR2_PACKAGE_DROPBEAR=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
def test_run(self):
img = os.path.join(self.builddir, "images", "rootfs.cpio")
#
class TestIPythonPy2(TestPythonBase):
config = TestPythonBase.config + \
-"""
-BR2_PACKAGE_PYTHON=y
-BR2_PACKAGE_PYTHON_IPYTHON=y
-"""
+ """
+ BR2_PACKAGE_PYTHON=y
+ BR2_PACKAGE_PYTHON_IPYTHON=y
+ """
interpreter = "ipython"
def test_run(self):
class TestIPythonPy3(TestPythonBase):
config = TestPythonBase.config + \
-"""
-BR2_PACKAGE_PYTHON3=y
-BR2_PACKAGE_PYTHON_IPYTHON=y
-"""
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_IPYTHON=y
+ """
interpreter = "ipython"
def test_run(self):
class TestPythonBase(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
-"""
-BR2_TARGET_ROOTFS_CPIO=y
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ """
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
interpreter = "python"
def login(self):
class TestPython2(TestPythonBase):
config = TestPythonBase.config + \
-"""
-BR2_PACKAGE_PYTHON=y
-"""
+ """
+ BR2_PACKAGE_PYTHON=y
+ """
def test_run(self):
self.login()
self.version_test("Python 2")
class TestPython3(TestPythonBase):
config = TestPythonBase.config + \
-"""
-BR2_PACKAGE_PYTHON3=y
-"""
+ """
+ BR2_PACKAGE_PYTHON3=y
+ """
def test_run(self):
self.login()
self.version_test("Python 3")
import infra
BASIC_CONFIG = \
-"""
-BR2_TARGET_ROOTFS_CPIO=y
-# BR2_TARGET_ROOTFS_TAR is not set
-"""
+ """
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
def has_broken_links(path):
for root, dirs, files in os.walk(path):
class TestExternalToolchainSourceryArmv4(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=y
-BR2_arm920t=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
-"""
+ """
+ BR2_arm=y
+ BR2_arm920t=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
+ """
toolchain_prefix = "arm-none-linux-gnueabi"
def test_run(self):
class TestExternalToolchainSourceryArmv5(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
-"""
+ """
+ BR2_arm=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
+ """
toolchain_prefix = "arm-none-linux-gnueabi"
def test_run(self):
class TestExternalToolchainSourceryArmv7(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=y
-BR2_cortex_a8=y
-BR2_ARM_EABI=y
-BR2_ARM_INSTRUCTIONS_THUMB2=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
-"""
+ """
+ BR2_arm=y
+ BR2_cortex_a8=y
+ BR2_ARM_EABI=y
+ BR2_ARM_INSTRUCTIONS_THUMB2=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
+ """
toolchain_prefix = "arm-none-linux-gnueabi"
def test_run(self):
class TestExternalToolchainLinaroArm(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=y
-BR2_cortex_a8=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y
-"""
+ """
+ BR2_arm=y
+ BR2_cortex_a8=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y
+ """
toolchain_prefix = "arm-linux-gnueabihf"
def test_run(self):
class TestExternalToolchainBuildrootMusl(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=y
-BR2_cortex_a9=y
-BR2_ARM_ENABLE_VFP=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-arm-cortex-a9-musl-2017.05-444-g6c704ba.tar.bz2"
-BR2_TOOLCHAIN_EXTERNAL_GCC_6=y
-BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_11=y
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
-BR2_TOOLCHAIN_EXTERNAL_CXX=y
-"""
+ """
+ BR2_arm=y
+ BR2_cortex_a9=y
+ BR2_ARM_ENABLE_VFP=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-arm-cortex-a9-musl-2017.05-444-g6c704ba.tar.bz2"
+ BR2_TOOLCHAIN_EXTERNAL_GCC_6=y
+ BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_11=y
+ BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
+ BR2_TOOLCHAIN_EXTERNAL_CXX=y
+ """
toolchain_prefix = "arm-linux"
def test_run(self):
class TestExternalToolchainCtngMusl(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=y
-BR2_cortex_a9=y
-BR2_ARM_ENABLE_VFP=y
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
-BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
-BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.net/toolchains/tarballs/arm-ctng-linux-musleabihf.tar.xz"
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-ctng-linux-musleabihf"
-BR2_TOOLCHAIN_EXTERNAL_GCC_7=y
-BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
-BR2_TOOLCHAIN_EXTERNAL_CXX=y
-"""
+ """
+ BR2_arm=y
+ BR2_cortex_a9=y
+ BR2_ARM_ENABLE_VFP=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
+ BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
+ BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.net/toolchains/tarballs/arm-ctng-linux-musleabihf.tar.xz"
+ BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-ctng-linux-musleabihf"
+ BR2_TOOLCHAIN_EXTERNAL_GCC_7=y
+ BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
+ BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
+ BR2_TOOLCHAIN_EXTERNAL_CXX=y
+ """
toolchain_prefix = "arm-ctng-linux-musleabihf"
def test_run(self):
class TestExternalToolchainBuildrootuClibc(TestExternalToolchain):
config = BASIC_CONFIG + \
-"""
-BR2_arm=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-arm-full-2017.05-444-g6c704ba.tar.bz2"
-BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
-BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
-BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
-# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
-BR2_TOOLCHAIN_EXTERNAL_CXX=y
-"""
+ """
+ BR2_arm=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-arm-full-2017.05-444-g6c704ba.tar.bz2"
+ BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
+ BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
+ BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
+ # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
+ BR2_TOOLCHAIN_EXTERNAL_CXX=y
+ """
toolchain_prefix = "arm-linux"
def test_run(self):
class TestExternalToolchainCCache(TestExternalToolchainBuildrootuClibc):
extraconfig = \
-"""
-BR2_CCACHE=y
-BR2_CCACHE_DIR="{builddir}/ccache-dir"
-"""
+ """
+ BR2_CCACHE=y
+ BR2_CCACHE_DIR="{builddir}/ccache-dir"
+ """
def __init__(self, names):
super(TestExternalToolchainBuildrootuClibc, self).__init__(names)