test_python_scipy.py 1.0 KB

123456789101112131415161718192021222324252627282930
  1. import os
  2. from tests.package.test_python import TestPythonPackageBase
  3. class TestPythonPy3SciPy(TestPythonPackageBase):
  4. __test__ = True
  5. # We can't use the base configuration, as we need a glibc
  6. # toolchain for scipy
  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_SCIPY=y
  15. BR2_TARGET_ROOTFS_EXT2=y
  16. BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
  17. # BR2_TARGET_ROOTFS_TAR is not set
  18. """
  19. sample_scripts = ["tests/package/sample_python_scipy.py"]
  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()