From 7cac4201f3e8568e6b5304a7c149208d6536abbd Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 18 Oct 2025 21:43:05 +0200 Subject: [PATCH] package/python-xmodem: add host variant The host variant of python-xmodem will be needed by Snagboot, so this commit enables it. We also add a very simple test case that simply makes sure we can import the module. Testing xmodem more extensively is difficult without an actual serial port to open. Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain --- DEVELOPERS | 1 + package/python-xmodem/python-xmodem.mk | 1 + support/testing/tests/package/test_python_xmodem.py | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 support/testing/tests/package/test_python_xmodem.py diff --git a/DEVELOPERS b/DEVELOPERS index 6a57433e10..26c8b4ea01 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3292,6 +3292,7 @@ F: support/testing/tests/package/test_python_git.py F: support/testing/tests/package/test_python_pyusb.py F: support/testing/tests/package/test_python_serial.py F: support/testing/tests/package/test_python_unittest_xml_reporting.py +F: support/testing/tests/package/test_python_xmodem.py F: support/testing/tests/toolchain/test_external_arm.py F: toolchain/ diff --git a/package/python-xmodem/python-xmodem.mk b/package/python-xmodem/python-xmodem.mk index d7040f7245..1ef5f53bec 100644 --- a/package/python-xmodem/python-xmodem.mk +++ b/package/python-xmodem/python-xmodem.mk @@ -12,3 +12,4 @@ PYTHON_XMODEM_LICENSE = MIT PYTHON_XMODEM_LICENSE_FILES = LICENSE $(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/support/testing/tests/package/test_python_xmodem.py b/support/testing/tests/package/test_python_xmodem.py new file mode 100644 index 0000000000..b9feb78109 --- /dev/null +++ b/support/testing/tests/package/test_python_xmodem.py @@ -0,0 +1,9 @@ +import infra.basetest + + +class TestHostPythonXmodem(infra.basetest.BRHostPkgTest): + hostpkgs = ["host-python-xmodem"] + + def test_run(self): + cmd = ["host/bin/python3", "-c", "import xmodem"] + infra.run_cmd_on_host(self.builddir, cmd)