Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Flaviu Nistor <flaviu.nistor@gmail.com>
Cc: buildroot@buildroot.org,
	 James Hilliard <james.hilliard1@gmail.com>,
	Julien Olivain <ju.o@free.fr>
Subject: Re: [Buildroot] [PATCH v4 RESEND 3/3] support/testing: add snappy test
Date: Sun, 11 Oct 2026 12:14:53 +0200	[thread overview]
Message-ID: <874iesh7c2.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20261002103144.13914-3-flaviu.nistor@gmail.com> (Flaviu Nistor's message of "Fri, 2 Oct 2026 13:31:37 +0300")

>>>>> "Flaviu" == Flaviu Nistor <flaviu.nistor@gmail.com> writes:

 > 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
 > +        """

Ideally we should fix the issue that you run into with our default armv5
kernel or at least document why we need this. As an alternative the
standard armv7 kernel could also be used, similar to E.G. test_bat.py


 > +    interpreter = "python3"

The default is fine here, so no need to override.

> +    sample_scripts = ["tests/package/sample_python_snappy.py"]
 > +    timeout = 20

Why?

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-10-11 10:15 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 ` [Buildroot] [PATCH v4 RESEND 3/3] support/testing: add snappy test Flaviu Nistor
2026-10-11 10:14   ` Peter Korsgaard [this message]
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=874iesh7c2.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.org \
    --cc=flaviu.nistor@gmail.com \
    --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