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 RESEND 3/3] support/testing: add snappy test
Date: Fri, 2 Oct 2026 13:31:37 +0300 [thread overview]
Message-ID: <20261002103144.13914-3-flaviu.nistor@gmail.com> (raw)
In-Reply-To: <20261002103144.13914-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
next prev parent reply other threads:[~2026-10-02 10:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 10:31 [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package Flaviu Nistor
2026-10-02 10:31 ` [Buildroot] [PATCH v4 RESEND 2/3] package/python-snappy: bump version to 0.7.2 Flaviu Nistor
2026-10-11 10:12 ` Peter Korsgaard
2026-10-13 18:53 ` Flaviu Nistor
2026-10-02 10:31 ` Flaviu Nistor [this message]
2026-10-11 10:14 ` [Buildroot] [PATCH v4 RESEND 3/3] support/testing: add snappy test Peter Korsgaard
2026-10-13 18:58 ` Flaviu Nistor
2026-10-11 7:53 ` [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package Peter Korsgaard
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=20261002103144.13914-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox