From 02201ecb444cacf2c76b7e452792bb8bb3674064 Mon Sep 17 00:00:00 2001 From: Flaviu Nistor Date: Fri, 16 Oct 2026 15:32:59 +0300 Subject: [PATCH] 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 Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 2 ++ support/testing/tests/package/sample_python_snappy.py | 5 +++++ support/testing/tests/package/test_python_snappy.py | 11 +++++++++++ 3 files changed, 18 insertions(+) create mode 100644 support/testing/tests/package/sample_python_snappy.py create mode 100644 support/testing/tests/package/test_python_snappy.py diff --git a/DEVELOPERS b/DEVELOPERS index 2f10f855ac..f46d09db5a 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1147,6 +1147,8 @@ F: support/testing/tests/package/test_python_pyroute2.py N: Flaviu Nistor F: package/python-cramjam/ F: package/python-snappy/ +F: support/testing/tests/package/test_python_snappy.py +F: support/testing/tests/package/sample_python_snappy.py N: Flávio Tapajós F: configs/asus_tinker-s_rk3288_defconfig diff --git a/support/testing/tests/package/sample_python_snappy.py b/support/testing/tests/package/sample_python_snappy.py new file mode 100644 index 0000000000..842a4e98e5 --- /dev/null +++ b/support/testing/tests/package/sample_python_snappy.py @@ -0,0 +1,5 @@ +import snappy + +payload = b"Buildroot python-snappy runtime test\n" +compressed = snappy.compress(payload) +decompressed = snappy.uncompress(compressed) diff --git a/support/testing/tests/package/test_python_snappy.py b/support/testing/tests/package/test_python_snappy.py new file mode 100644 index 0000000000..b9610980f8 --- /dev/null +++ b/support/testing/tests/package/test_python_snappy.py @@ -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"]