test_python_crossbar.py 1.0 KB

1234567891011121314151617181920212223242526272829
  1. from tests.package.test_python import TestPythonPackageBase
  2. import os
  3. class TestPythonPy3Crossbar(TestPythonPackageBase):
  4. __test__ = True
  5. # Need to use a different toolchain than the default due to
  6. # python-cryptography using Rust (not available with uclibc)
  7. config = \
  8. """
  9. BR2_arm=y
  10. BR2_TOOLCHAIN_EXTERNAL=y
  11. BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
  12. BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y
  13. BR2_PACKAGE_PYTHON3=y
  14. BR2_PACKAGE_PYTHON_CROSSBAR=y
  15. BR2_TARGET_ROOTFS_EXT2=y
  16. BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
  17. """
  18. sample_scripts = ["tests/package/sample_python_crossbar.py"]
  19. timeout = 60
  20. def login(self):
  21. ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2")
  22. self.emulator.boot(arch="armv5",
  23. kernel="builtin",
  24. options=["-drive", "file=%s,if=scsi,format=raw" % ext2_file],
  25. kernel_cmdline=["rootwait", "root=/dev/sda"])
  26. self.emulator.login()