mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-22 00:41:55 -09:00
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:
committed by
Thomas Petazzoni
parent
a8c315b62c
commit
02201ecb44
@@ -1147,6 +1147,8 @@ F: support/testing/tests/package/test_python_pyroute2.py
|
||||
N: Flaviu Nistor <flaviu.nistor@gmail.com>
|
||||
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 <flavio.tapajos@newtesc.com.br>
|
||||
F: configs/asus_tinker-s_rk3288_defconfig
|
||||
|
||||
5
support/testing/tests/package/sample_python_snappy.py
Normal file
5
support/testing/tests/package/sample_python_snappy.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import snappy
|
||||
|
||||
payload = b"Buildroot python-snappy runtime test\n"
|
||||
compressed = snappy.compress(payload)
|
||||
decompressed = snappy.uncompress(compressed)
|
||||
11
support/testing/tests/package/test_python_snappy.py
Normal file
11
support/testing/tests/package/test_python_snappy.py
Normal 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"]
|
||||
Reference in New Issue
Block a user