* [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests
@ 2025-11-20 22:08 Zoltan Gyarmati
2025-11-20 22:08 ` [Buildroot] [PATCH 2/2] package/quazip: add runtime tests Zoltan Gyarmati
2026-01-01 21:59 ` [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests Thomas Petazzoni via buildroot
0 siblings, 2 replies; 4+ messages in thread
From: Zoltan Gyarmati @ 2025-11-20 22:08 UTC (permalink / raw)
To: buildroot; +Cc: Zoltan Gyarmati
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
package/quazip/Config.in | 11 +++++++++++
package/quazip/quazip.mk | 10 ++++++++++
2 files changed, 21 insertions(+)
diff --git a/package/quazip/Config.in b/package/quazip/Config.in
index 4c7a187571..c6099719e5 100644
--- a/package/quazip/Config.in
+++ b/package/quazip/Config.in
@@ -10,3 +10,14 @@ config BR2_PACKAGE_QUAZIP
archives. It uses the Qt toolkit.
http://quazip.sourceforge.net
+
+if BR2_PACKAGE_QUAZIP
+
+config BR2_PACKAGE_QUAZIP_INSTALL_TESTS
+ bool "Build tests"
+ select BR2_PACKAGE_QT6BASE_TEST if BR2_PACKAGE_QT6
+ select BR2_PACKAGE_QT6BASE_NETWORK if BR2_PACKAGE_QT6
+ help
+ Build and install unit test binaries
+
+endif
diff --git a/package/quazip/quazip.mk b/package/quazip/quazip.mk
index 06b702e732..830eb92065 100644
--- a/package/quazip/quazip.mk
+++ b/package/quazip/quazip.mk
@@ -16,6 +16,16 @@ ifeq ($(BR2_PACKAGE_QT6BASE),y)
QUAZIP_DEPENDENCIES += qt6base qt6core5compat
endif
+ifeq ($(BR2_PACKAGE_QUAZIP_INSTALL_TESTS),y)
+QUAZIP_CONF_OPTS += -DQUAZIP_ENABLE_TESTS=ON
+
+define QUAZIP_INSTALL_TESTS
+ $(INSTALL) -D -m 0755 $(@D)/qztest/qztest $(TARGET_DIR)/usr/bin
+endef
+
+QUAZIP_POST_INSTALL_TARGET_HOOKS += QUAZIP_INSTALL_TESTS
+endif
+
QUAZIP_LICENSE = LGPL-2.1
QUAZIP_LICENSE_FILES = COPYING
QUAZIP_CPE_ID_VALID = YES
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/quazip: add runtime tests
2025-11-20 22:08 [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests Zoltan Gyarmati
@ 2025-11-20 22:08 ` Zoltan Gyarmati
2026-01-01 22:02 ` Thomas Petazzoni via buildroot
2026-01-01 21:59 ` [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests Thomas Petazzoni via buildroot
1 sibling, 1 reply; 4+ messages in thread
From: Zoltan Gyarmati @ 2025-11-20 22:08 UTC (permalink / raw)
To: buildroot; +Cc: Zoltan Gyarmati
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
DEVELOPERS | 1 +
support/testing/tests/package/test_quazip.py | 43 ++++++++++++++++++++
2 files changed, 44 insertions(+)
create mode 100644 support/testing/tests/package/test_quazip.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 0272b4ba33..86a91332d5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3541,3 +3541,4 @@ F: package/quazip/
F: package/shapelib/
F: package/simple-mail/
F: package/tinc/
+F: support/testing/tests/package/test_quazip.py
diff --git a/support/testing/tests/package/test_quazip.py b/support/testing/tests/package/test_quazip.py
new file mode 100644
index 0000000000..ae17546898
--- /dev/null
+++ b/support/testing/tests/package/test_quazip.py
@@ -0,0 +1,43 @@
+import os
+
+import infra.basetest
+
+
+class TestQuazipQt6(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_PACKAGE_QT6=y
+ BR2_PACKAGE_QUAZIP=y
+ BR2_PACKAGE_QUAZIP_INSTALL_TESTS=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ """
+
+ def test_run(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+
+ # qztest returns non-zero if any of the tests failed
+ self.assertRunOk("/usr/bin/qztest", 120)
+
+
+class TestQuazipQt5(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_PACKAGE_QT5=y
+ BR2_PACKAGE_QUAZIP=y
+ BR2_PACKAGE_QUAZIP_INSTALL_TESTS=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ """
+
+ def test_run(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+
+ # qztest returns non-zero if any of the tests failed
+ self.assertRunOk("/usr/bin/qztest", 120)
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests
2025-11-20 22:08 [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests Zoltan Gyarmati
2025-11-20 22:08 ` [Buildroot] [PATCH 2/2] package/quazip: add runtime tests Zoltan Gyarmati
@ 2026-01-01 21:59 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-01 21:59 UTC (permalink / raw)
To: Zoltan Gyarmati; +Cc: buildroot
Hello Zoltan,
Thanks for the patch!
On Thu, 20 Nov 2025 23:08:00 +0100
Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com> wrote:
> Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
> ---
> package/quazip/Config.in | 11 +++++++++++
> package/quazip/quazip.mk | 10 ++++++++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/package/quazip/Config.in b/package/quazip/Config.in
> index 4c7a187571..c6099719e5 100644
> --- a/package/quazip/Config.in
> +++ b/package/quazip/Config.in
> @@ -10,3 +10,14 @@ config BR2_PACKAGE_QUAZIP
> archives. It uses the Qt toolkit.
>
> http://quazip.sourceforge.net
> +
> +if BR2_PACKAGE_QUAZIP
> +
> +config BR2_PACKAGE_QUAZIP_INSTALL_TESTS
> + bool "Build tests"
> + select BR2_PACKAGE_QT6BASE_TEST if BR2_PACKAGE_QT6
> + select BR2_PACKAGE_QT6BASE_NETWORK if BR2_PACKAGE_QT6
I was initially a bit surprised that you didn't have the same for Qt5,
but test and network are always enabled for Qt5, so makes sense.
> +ifeq ($(BR2_PACKAGE_QUAZIP_INSTALL_TESTS),y)
> +QUAZIP_CONF_OPTS += -DQUAZIP_ENABLE_TESTS=ON
> +
> +define QUAZIP_INSTALL_TESTS
> + $(INSTALL) -D -m 0755 $(@D)/qztest/qztest $(TARGET_DIR)/usr/bin
> +endef
> +
> +QUAZIP_POST_INSTALL_TARGET_HOOKS += QUAZIP_INSTALL_TESTS
I've added a:
QUAZIP_CONF_OPTS += -DQUAZIP_ENABLE_TESTS=OFF
> +endif
And applied to master. Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/quazip: add runtime tests
2025-11-20 22:08 ` [Buildroot] [PATCH 2/2] package/quazip: add runtime tests Zoltan Gyarmati
@ 2026-01-01 22:02 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-01 22:02 UTC (permalink / raw)
To: Zoltan Gyarmati; +Cc: buildroot
Hello Zoltan,
On Thu, 20 Nov 2025 23:08:01 +0100
Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com> wrote:
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 0272b4ba33..86a91332d5 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -3541,3 +3541,4 @@ F: package/quazip/
> F: package/shapelib/
> F: package/simple-mail/
> F: package/tinc/
> +F: support/testing/tests/package/test_quazip.py
Indentation here should have been with one tab.
> diff --git a/support/testing/tests/package/test_quazip.py b/support/testing/tests/package/test_quazip.py
> new file mode 100644
> index 0000000000..ae17546898
> --- /dev/null
> +++ b/support/testing/tests/package/test_quazip.py
> @@ -0,0 +1,43 @@
> +import os
> +
> +import infra.basetest
> +
> +
> +class TestQuazipQt6(infra.basetest.BRTest):
> + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> + """
> + BR2_PACKAGE_QT6=y
> + BR2_PACKAGE_QUAZIP=y
> + BR2_PACKAGE_QUAZIP_INSTALL_TESTS=y
> + BR2_TARGET_ROOTFS_CPIO=y
Other tests have those lines aligned with the """
> +class TestQuazipQt5(infra.basetest.BRTest):
> + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> + """
> + BR2_PACKAGE_QT5=y
> + BR2_PACKAGE_QUAZIP=y
> + BR2_PACKAGE_QUAZIP_INSTALL_TESTS=y
> + BR2_TARGET_ROOTFS_CPIO=y
Here as well.
I fixed those and applied to master, thanks!
One thing that could have been improved is factorize both tests with a
common class, since they are 99% identical, and two child classes, one
for Qt5, one for Qt6, just adding the one line difference in the config
file between each test. If you're looking for something quick to do for
Buildroot, that's one idea :-)
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-01 22:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 22:08 [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests Zoltan Gyarmati
2025-11-20 22:08 ` [Buildroot] [PATCH 2/2] package/quazip: add runtime tests Zoltan Gyarmati
2026-01-01 22:02 ` Thomas Petazzoni via buildroot
2026-01-01 21:59 ` [Buildroot] [PATCH 1/2] package/quazip: add config option to enable building and installing unit tests Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox