1from tests.package.test_python import TestPythonPackageBase
2import os
3
4
5class TestPythonPy3Boto3(TestPythonPackageBase):
6    __test__ = True
7    config = TestPythonPackageBase.config + \
8        """
9        BR2_PACKAGE_PYTHON3=y
10        BR2_PACKAGE_PYTHON_BOTO3=y
11        BR2_TARGET_ROOTFS_EXT2=y
12        BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
13        """
14    sample_scripts = ["tests/package/sample_python_boto3.py"]
15    timeout = 10
16
17    def login(self):
18        ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2")
19        self.emulator.boot(arch="armv5",
20                           kernel="builtin",
21                           options=["-drive", "file=%s,if=scsi,format=raw" % ext2_file],
22                           kernel_cmdline=["rootwait", "root=/dev/sda"])
23        self.emulator.login()
24