support/testing: add snappy test

Add a simple test case that imports the module and does a simple
compress decompress routine.

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Flaviu Nistor
2026-10-16 15:32:59 +03:00
committed by Thomas Petazzoni
parent a8c315b62c
commit 02201ecb44
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import snappy
payload = b"Buildroot python-snappy runtime test\n"
compressed = snappy.compress(payload)
decompressed = snappy.uncompress(compressed)

View File

@@ -0,0 +1,11 @@
from tests.package.test_python import TestPythonPackageBase
class TestPythonPy3Snappy(TestPythonPackageBase):
__test__ = True
config = TestPythonPackageBase.config + \
"""
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_SNAPPY=y
"""
sample_scripts = ["tests/package/sample_python_snappy.py"]