package/python-crccheck: new package

This commit adds a new host only package for the crccheck Python
module, which is a dependency of Snagboot.

Homepage on PyPi: https://pypi.org/project/crccheck/

This commit also adds a very basic test case that allows to verify
that the Python module can be imported and that some minimal
functionality works.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Thomas Petazzoni
2025-10-18 21:43:01 +02:00
committed by Julien Olivain
parent 9468f1c099
commit d03cfe515b
4 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import infra.basetest
class TestHostPythonCrccheck(infra.basetest.BRHostPkgTest):
hostpkgs = ["host-python-crccheck"]
def test_run(self):
cmd = ["host/bin/python3", "-c", "import crccheck; print(crccheck.crc.Crc32.calc(bytearray.fromhex('DEADBEEF')))"]
res = infra.run_cmd_on_host(self.builddir, cmd)
self.assertEqual(res.strip(), "2090640218")