All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flaviu Nistor <flaviu.nistor@gmail.com>
To: buildroot@buildroot.org
Cc: Flaviu Nistor <flaviu.nistor@gmail.com>,
	Julien Olivain <ju.o@free.fr>,
	James Hilliard <james.hilliard1@gmail.com>
Subject: [Buildroot] [PATCH v5 2/2] support/testing: add snappy test
Date: Fri, 16 Oct 2026 15:32:59 +0300	[thread overview]
Message-ID: <20261016123321.7165-2-flaviu.nistor@gmail.com> (raw)
In-Reply-To: <20261016123321.7165-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>
---
Changes in v5:
- Use default armv5 for the test since cramjam does not fail to run on 32-bit
architectures on version 2.14.0 on which python-snappy depends on. 
- Link to v4: https://lore.kernel.org/all/20261002103144.13914-3-flaviu.nistor@gmail.com/

 DEVELOPERS                                          |  2 ++
 .../testing/tests/package/sample_python_snappy.py   |  5 +++++
 support/testing/tests/package/test_python_snappy.py | 13 +++++++++++++
 3 files changed, 20 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 2773f0776a..9994630c6f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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
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..1c07ddc1e8
--- /dev/null
+++ b/support/testing/tests/package/test_python_snappy.py
@@ -0,0 +1,13 @@
+import os
+
+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"]
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-10-16 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 12:32 [Buildroot] [PATCH v5 1/2] package/python-snappy: bump version to 0.7.2 Flaviu Nistor
2026-10-16 12:32 ` Flaviu Nistor [this message]
2026-10-19 17:17   ` [Buildroot] [PATCH v5 2/2] support/testing: add snappy test Thomas Petazzoni via buildroot
2026-10-19 17:17 ` [Buildroot] [PATCH v5 1/2] package/python-snappy: bump version to 0.7.2 Thomas Petazzoni via buildroot

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=20261016123321.7165-2-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.