From: Flaviu Nistor <flaviu.nistor@gmail.com>
To: buildroot@buildroot.org
Cc: Flaviu Nistor <flaviu.nistor@gmail.com>,
James Hilliard <james.hilliard1@gmail.com>,
Julien Olivain <ju.o@free.fr>
Subject: [Buildroot] [PATCH v4 3/3] support/testing: add snappy test
Date: Thu, 30 Jul 2026 10:59:40 +0300 [thread overview]
Message-ID: <20260730075941.7679-3-flaviu.nistor@gmail.com> (raw)
In-Reply-To: <20260730075941.7679-1-flaviu.nistor@gmail.com>
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>
---
DEVELOPERS | 2 ++
.../tests/package/sample_python_snappy.py | 7 ++++
.../tests/package/test_python_snappy.py | 34 +++++++++++++++++++
3 files changed, 43 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 dbe05b7806..153b2f4af5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1140,6 +1140,8 @@ F: package/python-cramjam/
F: package/python-rich/
F: package/python-smmap2/
F: package/python-snappy/
+F: support/testing/tests/package/sample_python_snappy.py
+F: support/testing/tests/package/test_python_snappy.py
N: Flávio Tapajós <flavio.tapajos@newtesc.com.br>
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..ff2c07c05a
--- /dev/null
+++ b/support/testing/tests/package/sample_python_snappy.py
@@ -0,0 +1,7 @@
+import snappy
+
+payload = b"Buildroot python-snappy runtime test\n"
+compressed = snappy.compress(payload)
+decompressed = snappy.uncompress(compressed)
+
+assert decompressed == payload
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..8c0092bd23
--- /dev/null
+++ b/support/testing/tests/package/test_python_snappy.py
@@ -0,0 +1,34 @@
+import os
+
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Snappy(TestPythonPackageBase):
+ __test__ = True
+ config = """
+ BR2_aarch64=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.135"
+ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_SNAPPY=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+ interpreter = "python3"
+ sample_scripts = ["tests/package/sample_python_snappy.py"]
+ timeout = 20
+
+ def login(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ kern = os.path.join(self.builddir, "images", "Image")
+ self.emulator.boot(arch="aarch64",
+ kernel=kern,
+ kernel_cmdline=["console=ttyAMA0"],
+ options=["-M", "virt", "-cpu", "cortex-a57", "-m", "256M",
+ "-initrd", cpio_file])
+ self.emulator.login()
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-07-30 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 7:59 [Buildroot] [PATCH v4 1/3] package/python-cramjam: new package Flaviu Nistor
2026-07-30 7:59 ` [Buildroot] [PATCH v4 2/3] package/python-snappy: bump version to 0.7.2 Flaviu Nistor
2026-07-30 7:59 ` Flaviu Nistor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260730075941.7679-3-flaviu.nistor@gmail.com \
--to=flaviu.nistor@gmail.com \
--cc=buildroot@buildroot.org \
--cc=james.hilliard1@gmail.com \
--cc=ju.o@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.