[Buildroot] [PATCH 07/11] package/python-xmodem: add host variant

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Oct 18 19:43:05 UTC 2025


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 <thomas.petazzoni at bootlin.com>
---
 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 4501a1c98d..63c8d5673c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3288,6 +3288,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)
-- 
2.51.0



More information about the buildroot mailing list