1from tests.package.test_python import TestPythonPackageBase
2
3import os
4
5
6class TestPythonPy3rtoml(TestPythonPackageBase):
7    __test__ = True
8    config = \
9        """
10        BR2_arm=y
11        BR2_cortex_a9=y
12        BR2_ARM_ENABLE_NEON=y
13        BR2_ARM_ENABLE_VFP=y
14        BR2_TOOLCHAIN_EXTERNAL=y
15        BR2_PACKAGE_PYTHON3=y
16        BR2_PACKAGE_PYTHON_RTOML=y
17        BR2_TARGET_ROOTFS_CPIO=y
18        # BR2_TARGET_ROOTFS_TAR is not set
19        """
20    sample_scripts = ["tests/package/sample_python_rtoml.py"]
21    timeout = 30
22
23    def login(self):
24        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
25        self.emulator.boot(arch="armv7",
26                           kernel="builtin",
27                           options=["-initrd", cpio_file])
28        self.emulator.login()
29