mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
support/testing: python-requests: new runtime test
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu> [Peter: Fix flake8 warning, use http.server instead of relying on connectivity] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
ef52933074
commit
425abcd025
21
support/testing/tests/package/test_python_requests.py
Normal file
21
support/testing/tests/package/test_python_requests.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
class TestPythonPy3Requests(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_REQUESTS=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_requests.py"]
|
||||
timeout = 15
|
||||
|
||||
def login(self):
|
||||
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
|
||||
self.emulator.boot(arch="armv7",
|
||||
kernel="builtin",
|
||||
options=["-initrd", cpio_file])
|
||||
self.emulator.login()
|
||||
self.assertRunOk("python3 -m http.server 80 &")
|
||||
Reference in New Issue
Block a user