[Buildroot] [git commit] package/python-tftpy: add host variant
Julien Olivain
ju.o at free.fr
Thu Oct 30 20:10:49 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=b2a657297d6d7570ae35939dc0bbc2abc417fb90
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
A host variant of python-tftpy will be needed for Snagboot, so enable
it, and add a very simple test for the host package. We considered
adding a test that actually starts a TFTP server with tftpy and then
downloads from that server with the client-side of tftpy, but
allocating an available UDP port reliably is tricky, so we kept the
test case very simple for now.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Reviewed-by: Colin Foster <colin.foster at in-advantage.com>
Signed-off-by: Julien Olivain <ju.o at free.fr>
---
package/python-tftpy/python-tftpy.mk | 1 +
support/testing/tests/package/test_python_tftpy.py | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/package/python-tftpy/python-tftpy.mk b/package/python-tftpy/python-tftpy.mk
index 66de17eaab..322d514f1f 100644
--- a/package/python-tftpy/python-tftpy.mk
+++ b/package/python-tftpy/python-tftpy.mk
@@ -11,3 +11,4 @@ PYTHON_TFTPY_LICENSE_FILES = LICENSE
PYTHON_TFTPY_SETUP_TYPE = setuptools
$(eval $(python-package))
+$(eval $(host-python-package))
diff --git a/support/testing/tests/package/test_python_tftpy.py b/support/testing/tests/package/test_python_tftpy.py
index d64f2c29d7..1dfbde0b67 100644
--- a/support/testing/tests/package/test_python_tftpy.py
+++ b/support/testing/tests/package/test_python_tftpy.py
@@ -1,4 +1,5 @@
from tests.package.test_python import TestPythonPackageBase
+import infra.basetest
class TestPythonTftpy(TestPythonPackageBase):
@@ -9,3 +10,11 @@ class TestPythonTftpy(TestPythonPackageBase):
BR2_PACKAGE_PYTHON_TFTPY=y
"""
sample_scripts = ["tests/package/sample_python_tftpy.py"]
+
+
+class TestHostPythonTftpy(infra.basetest.BRHostPkgTest):
+ hostpkgs = ["host-python-tftpy"]
+
+ def test_run(self):
+ cmd = ["host/bin/python3", "-c", "import tftpy"]
+ infra.run_cmd_on_host(self.builddir, cmd)
More information about the buildroot
mailing list