test_python_scipy.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import os
  2. from tests.package.test_python import TestPythonPackageBase
  3. class TestPythonPy3SciPy(TestPythonPackageBase):
  4. __test__ = True
  5. # Need to use a different toolchain than the default due to
  6. # missing Fortran support (required by python-scipy) in Bootlin
  7. # stable toolchains 2024.05
  8. config = \
  9. """
  10. BR2_arm=y
  11. BR2_TOOLCHAIN_EXTERNAL=y
  12. BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
  13. BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE=y
  14. BR2_PACKAGE_PYTHON3=y
  15. BR2_PACKAGE_PYTHON_SCIPY=y
  16. BR2_TARGET_ROOTFS_EXT2=y
  17. BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
  18. # BR2_TARGET_ROOTFS_TAR is not set
  19. """
  20. sample_scripts = ["tests/package/sample_python_scipy.py"]
  21. timeout = 30
  22. def login(self):
  23. ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2")
  24. self.emulator.boot(arch="armv5",
  25. kernel="builtin",
  26. options=["-drive", "file=%s,if=scsi,format=raw" % ext2_file],
  27. kernel_cmdline=["rootwait", "root=/dev/sda"])
  28. self.emulator.login()