From 42e91dd54a1261b55239ad815c7411fd69d2945b Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 16:18:36 -0700 Subject: [PATCH 01/16] python3-pdm-backend: enable tests Add do_check() and checkdepends. --- srcpkgs/python3-pdm-backend/template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srcpkgs/python3-pdm-backend/template b/srcpkgs/python3-pdm-backend/template index 0c0f514f51205c..ee80de1df5dd32 100644 --- a/srcpkgs/python3-pdm-backend/template +++ b/srcpkgs/python3-pdm-backend/template @@ -4,6 +4,7 @@ version=2.4.9 revision=1 build_style=python3-pep517 hostmakedepends="python3 python3-build python3-packaging" +checkdepends="python3-pytest python3-setuptools git python3-devel" short_desc="PDM-Backend" maintainer="Andrea Brancaleoni " license="MIT" @@ -11,6 +12,12 @@ homepage="https://pypi.org/project/pdm-backend" distfiles="${PYPI_SITE}/p/pdm_backend/pdm_backend-${version}.tar.gz" checksum=c41a852ccbf4b567b033db9b2ae78660d7a4ea49307719959ab88a01f0aabb2e +do_check() { + GIT_AUTHOR_NAME=test GIT_AUTHOR_EMAIL=test@voidlinux.org \ + GIT_COMMITTER_NAME=test GIT_COMMITTER_EMAIL=test@voidlinux.org \ + PYTHONPATH="${PWD}/src" python3 -m pytest tests +} + post_install() { vlicense LICENSE } From 8bacf4d7e82efb8df3c5e5d117041a390ee71a3d Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 16:20:31 -0700 Subject: [PATCH 02/16] git-cola: enable tests Add do_check() and checkdepends. --- srcpkgs/git-cola/template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srcpkgs/git-cola/template b/srcpkgs/git-cola/template index d686c7281be4ac..114ee9557f1a97 100644 --- a/srcpkgs/git-cola/template +++ b/srcpkgs/git-cola/template @@ -6,6 +6,8 @@ build_style=python3-pep517 hostmakedepends="python3 python3-build python3-packaging python3-setuptools python3-setuptools_scm python3-wheel" depends="git qt6-svg python3-pyqt6-gui python3-pyqt6-widgets python3-pyqt6-network python3-QtPy python3-packaging python3-polib" +checkdepends="python3-pytest python3-pytest-xvfb python3-QtPy + python3-pyqt6-widgets python3-pyqt6-gui python3-pyqt6-network git" short_desc="Highly caffeinated Git GUI" maintainer="Andrea Brancaleoni " license="GPL-2.0-only" @@ -15,4 +17,9 @@ checksum=8b85c50ecf1086c9664c79348a96cebd7dbb65054d53ea2b02e70d53cb7f0981 if [ "$XBPS_WORDSIZE$XBPS_WORDSIZE" = "64$XBPS_TARGET_WORDSIZE" ]; then depends+=" python3-pyqt6-webengine" + checkdepends+=" python3-pyqt6-webengine" fi + +do_check() { + python3 -m pytest test +} From 6c6797d75761accca0159b046f9ee6291f6e848b Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 16:27:02 -0700 Subject: [PATCH 03/16] New package: python3-xattr-1.1.4 --- srcpkgs/python3-xattr/template | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 srcpkgs/python3-xattr/template diff --git a/srcpkgs/python3-xattr/template b/srcpkgs/python3-xattr/template new file mode 100644 index 00000000000000..2ac9225845e3d7 --- /dev/null +++ b/srcpkgs/python3-xattr/template @@ -0,0 +1,24 @@ +# Template file for 'python3-xattr' +pkgname=python3-xattr +version=1.1.4 +revision=1 +build_style=python3-module +hostmakedepends="python3-setuptools" +makedepends="python3-cffi python3-devel" +depends="python3-cffi" +checkdepends="python3-pytest" +short_desc="Python wrapper for extended filesystem attributes" +maintainer="Andrea Brancaleoni " +license="MIT" +homepage="https://github.com/xattr/xattr" +distfiles="${PYPI_SITE}/x/xattr/xattr-${version}.tar.gz" +checksum=b7b02ecb2270da5b7e7deaeea8f8b528c17368401c2b9d5f63e91f545b45d372 + +do_check() { + cp build/lib.*/xattr/_lib*.so xattr/ + python3 -m pytest tests +} + +post_install() { + vlicense LICENSE.txt +} From 4369f42ff483a6611bb73e5d4c412ade105115a8 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 17:13:09 -0700 Subject: [PATCH 04/16] rmlint: enable tests Add do_check() and checkdepends. --- srcpkgs/rmlint/template | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/srcpkgs/rmlint/template b/srcpkgs/rmlint/template index 6e1cea10d566e9..a713fbd516a0ab 100644 --- a/srcpkgs/rmlint/template +++ b/srcpkgs/rmlint/template @@ -7,6 +7,7 @@ make_build_args="VERBOSE=1" hostmakedepends="pkg-config python3-Sphinx python3-setuptools glib-devel" makedepends="libblkid-devel elfutils-devel json-glib-devel" depends="python3-cairo python3-colorlog python3-gobject python3-parsedatetime" +checkdepends="python3-pytest python3-psutil python3-xattr" short_desc="Extremely fast tool to remove duplicates" maintainer="Andrea Brancaleoni " license="GPL-3.0-or-later" @@ -15,6 +16,16 @@ changelog="https://raw.githubusercontent.com/sahib/rmlint/master/CHANGELOG.md" distfiles="https://github.com/sahib/${pkgname}/archive/v${version}.tar.gz" checksum=8ffdbd5d09d15c8717ae55497e90d6fa46f085b45ac1056f2727076da180c33e +do_check() { + # test_merge_directories and test_path_doubles need bind mounts, + # test_man needs an installed manpage, [dash] tests need the dash + # shell which conflicts with chroot-bash in the build chroot + python3 -m pytest tests \ + --ignore=tests/test_options/test_merge_directories.py \ + --ignore=tests/test_robustness/test_path_doubles.py \ + -k "not test_man and not dash" +} + pre_build() { make_build_args+=" --prefix=${DESTDIR}/usr" } From a2bce7d7777cceef5e634f328fe9e512551c3c2f Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 17:13:31 -0700 Subject: [PATCH 05/16] virtme: add do_check, run tools with --help --- srcpkgs/virtme/template | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/srcpkgs/virtme/template b/srcpkgs/virtme/template index 6547006b77ee76..c4204fff58a2c9 100644 --- a/srcpkgs/virtme/template +++ b/srcpkgs/virtme/template @@ -3,7 +3,6 @@ pkgname=virtme version=0.1.1 revision=8 build_style=python3-module -pycompile_module="virtme" hostmakedepends="python3-setuptools" depends="python3" short_desc="Easy way to test your kernel changes in qemu/kvm" @@ -12,3 +11,10 @@ license="GPL-2.0-only" homepage="https://lwn.net/Articles/584620/" distfiles="https://git.kernel.org/pub/scm/utils/kernel/virtme/virtme.git/snapshot/virtme-${version}.tar.gz" checksum=4426dd60a11826ecc9675ee18bda95facd7eeed79607ee7cda488011acfb4fc0 + +do_check() { + # no upstream test suite; exercise the tools instead + ./virtme-run --help >/dev/null + ./virtme-configkernel --help >/dev/null + ./virtme-mkinitramfs --help >/dev/null +} From 0e609c17314352f1955f2fc92955db4b4bc95ba9 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 17:15:18 -0700 Subject: [PATCH 06/16] xboxdrv: add do_check, build test programs --- srcpkgs/xboxdrv/template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srcpkgs/xboxdrv/template b/srcpkgs/xboxdrv/template index 8a3be97f63c33c..ad4cc856a464f2 100644 --- a/srcpkgs/xboxdrv/template +++ b/srcpkgs/xboxdrv/template @@ -16,6 +16,13 @@ distfiles="${DEBIAN_SITE}/main/x/xboxdrv/xboxdrv_${version}.orig.tar.bz2" checksum=f307ba95442cfedd06a934ac572fe5b1d66ef3b73caa458c10c5a82d7b4819b9 python_version=3 +do_check() { + # upstream "tests" are demo mains without assertions and + # usb_system_test needs a controller; build them to validate + # that everything compiles and links + scons ${makejobs} ${make_build_args} tests +} + do_install() { make PREFIX=/usr DESTDIR=${DESTDIR} install } From da186b20bd8869c8f8418a034db728c822f1eed1 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:09 -0700 Subject: [PATCH 07/16] cdm: enable tests Add do_check() and checkdepends. --- srcpkgs/cdm/template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srcpkgs/cdm/template b/srcpkgs/cdm/template index f1fb8b2f646c50..dc5c4c2c399331 100644 --- a/srcpkgs/cdm/template +++ b/srcpkgs/cdm/template @@ -10,6 +10,11 @@ homepage="https://github.com/evertiro/cdm" distfiles="https://github.com/evertiro/cdm/archive/${version}.tar.gz" checksum=530042165ce65cdff3ec62ba9f077d0e8c6744c13f5d449d84fe2506a79d2e56 +do_check() { + # shell scripts only; validate syntax + bash -n src/cdm src/cdm-xlaunch src/profile.sh +} + do_install() { sed -i 's| /| $PKGDESTDIR/|g' install.sh PKGDESTDIR="$PKGDESTDIR" ./install.sh From b2ab332dd91036b96978a87fd943f156d4f16cdf Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:12 -0700 Subject: [PATCH 08/16] docker-gc: enable tests Add do_check() and checkdepends. --- srcpkgs/docker-gc/template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srcpkgs/docker-gc/template b/srcpkgs/docker-gc/template index 00938b9ab0b2fb..b883bbc8b26032 100644 --- a/srcpkgs/docker-gc/template +++ b/srcpkgs/docker-gc/template @@ -11,6 +11,11 @@ homepage="https://github.com/spotify/docker-gc" distfiles="$homepage/archive/$_commit.tar.gz" checksum=82ebc5eab842b41282c10e5cf1a82af521e4aa46e6d0fb9bddb2565cef5984a2 +do_check() { + # needs a running docker daemon to do anything else + bash -n docker-gc +} + make_dirs=" /var/lib/docker-gc 0775 root docker" From c46ded7b560b529876787706432f288a3db04698 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:12 -0700 Subject: [PATCH 09/16] asus-kbd-backlight: enable tests Add do_check() and checkdepends. --- srcpkgs/asus-kbd-backlight/template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srcpkgs/asus-kbd-backlight/template b/srcpkgs/asus-kbd-backlight/template index a3d116b0539e25..67d4068232df9b 100644 --- a/srcpkgs/asus-kbd-backlight/template +++ b/srcpkgs/asus-kbd-backlight/template @@ -9,6 +9,10 @@ maintainer="Andrea Brancaleoni " license="GFDL-1.3-or-later" homepage="https://wiki.archlinux.org/index.php/ASUS_Zenbook_Prime_UX31A#keyboard_backlight_script" +do_check() { + bash -n ${FILESDIR}/asus-kbd-backlight +} + do_install() { vbin $FILESDIR/asus-kbd-backlight vsv asus-kbd From 00a65a8f9524700f2e0a57c8c85611e7407e7d32 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:12 -0700 Subject: [PATCH 10/16] indicator-doom-cpu: enable tests Add do_check() and checkdepends. --- srcpkgs/indicator-doom-cpu/template | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/srcpkgs/indicator-doom-cpu/template b/srcpkgs/indicator-doom-cpu/template index 75da2d47ae3389..c68caf5000fb20 100644 --- a/srcpkgs/indicator-doom-cpu/template +++ b/srcpkgs/indicator-doom-cpu/template @@ -3,6 +3,7 @@ pkgname=indicator-doom-cpu version=1.0.1 revision=4 depends="python3-gobject gtk+3 libayatana-appindicator" +checkdepends="python3" short_desc="CPU load indicator showing the dying face from the video game DOOM" maintainer="Andrea Brancaleoni " license="GPL-3.0-only" @@ -10,6 +11,11 @@ homepage="https://github.com/ebruck/indicator-doom-cpu" distfiles="https://github.com/ebruck/indicator-doom-cpu/archive/v${version}.tar.gz" checksum=87dcb082c5032518b2616c85967ac92cf3618b6e0276266ec413537b6256c7d5 +do_check() { + # GUI indicator; validate the script compiles + python3 -m py_compile $pkgname +} + do_install() { vinstall $pkgname 755 usr/share/indicator-doom-cpu vinstall debian/indicator-doom-cpu.desktop 644 usr/share/applications From 2fe105cf536c3c8e48198edb05f0cffd12d688ed Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:13 -0700 Subject: [PATCH 11/16] trollock: enable tests Add do_check() and checkdepends. --- srcpkgs/trollock/template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srcpkgs/trollock/template b/srcpkgs/trollock/template index 2902adfa294640..bd63ccb8ee6c78 100644 --- a/srcpkgs/trollock/template +++ b/srcpkgs/trollock/template @@ -18,6 +18,11 @@ do_build() { -o trollock *.c $LDFLAGS -lX11 -lpam } +do_check() { + # -h prints usage and exits 0; validates X11/PAM linkage + ./trollock -h >/dev/null +} + do_install() { vbin trollock } From d08b5c9cfe898e8136368924dcace068f88446d8 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:14 -0700 Subject: [PATCH 12/16] darkhttpd: enable tests Add do_check() and checkdepends. --- srcpkgs/darkhttpd/template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/srcpkgs/darkhttpd/template b/srcpkgs/darkhttpd/template index 480a2e28c8d9c6..df9df750e31034 100644 --- a/srcpkgs/darkhttpd/template +++ b/srcpkgs/darkhttpd/template @@ -2,6 +2,7 @@ pkgname=darkhttpd version=1.17 revision=1 +checkdepends="curl" short_desc="Small and secure static webserver" maintainer="Andrea Brancaleoni " license="ISC" @@ -18,6 +19,19 @@ do_build() { ${CC} ${CFLAGS} ${LDFLAGS} darkhttpd.c -o darkhttpd } +do_check() { + # smoke test: serve a static file and fetch it back + mkdir -p www && echo "hello darkhttpd" > www/index.html + ./darkhttpd www --port 18231 --addr 127.0.0.1 >/dev/null 2>&1 & + local pid=$! + for i in 1 2 3 4 5; do + sleep 1 + curl -fsS http://127.0.0.1:18231/ > served && break + done + kill $pid + echo "hello darkhttpd" | diff - served +} + do_install() { vsv darkhttpd vbin darkhttpd From 0ff5771cbbc069cf7a9ff434eb46a7e6ea3eb361 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:14 -0700 Subject: [PATCH 13/16] bash-preexec: enable tests Add do_check() and checkdepends. --- srcpkgs/bash-preexec/template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srcpkgs/bash-preexec/template b/srcpkgs/bash-preexec/template index e843be98670782..9ab7b53cf0f471 100644 --- a/srcpkgs/bash-preexec/template +++ b/srcpkgs/bash-preexec/template @@ -3,6 +3,7 @@ pkgname=bash-preexec version=0.7.0 revision=1 depends="bash" +checkdepends="bats" short_desc="Preexec and Precmd functions for Bash just like Zsh" maintainer="Andrea Brancaleoni " license="MIT" @@ -10,6 +11,10 @@ homepage="https://github.com/rcaloras/bash-preexec" distfiles="https://github.com/rcaloras/bash-preexec/archive/${version}.tar.gz" checksum=f3d5698bde8533e9622b2ee2dcb0dd12e772d85018f4770a8899887ef6cd36a0 +do_check() { + bats test/bash-preexec.bats test/include-test.bats +} + do_install() { vbin bash-preexec.sh vlicense LICENSE.md From fb128400ee6ccf544a9abe834dc0b04506d41c65 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:14 -0700 Subject: [PATCH 14/16] kaitai-struct-compiler: enable tests Add do_check() and checkdepends. --- srcpkgs/kaitai-struct-compiler/template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srcpkgs/kaitai-struct-compiler/template b/srcpkgs/kaitai-struct-compiler/template index 84760fe900aa67..853cb56c60b41d 100644 --- a/srcpkgs/kaitai-struct-compiler/template +++ b/srcpkgs/kaitai-struct-compiler/template @@ -4,6 +4,7 @@ version=0.11 revision=1 hostmakedepends="unzip" depends="virtual?java-environment" +checkdepends="openjdk17-jre" short_desc="Compiler for the Kaitai declarative binary format parsing language" maintainer="Andrea Brancaleoni " license="GPL-3.0-or-later" @@ -11,6 +12,10 @@ homepage="http://kaitai.io" distfiles="https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/${version}/${pkgname}-${version}.zip" checksum=ff89389d9dc9e770d78a24af328763cb1f8e7b31ce7766c9edf10669a060f2a2 +do_check() { + bin/${pkgname} --version +} + pre_install() { # patch libdir sed -i 's|lib_dir=.*|lib_dir="/usr/share/java/kaitai-struct-compiler"|g' bin/$pkgname From 6c1b5b125602faf3d179f3bec42e79532d684272 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:14 -0700 Subject: [PATCH 15/16] subtle: enable tests Add do_check() and checkdepends. --- srcpkgs/subtle/template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srcpkgs/subtle/template b/srcpkgs/subtle/template index d52fd51ca1f057..f029599a609b11 100644 --- a/srcpkgs/subtle/template +++ b/srcpkgs/subtle/template @@ -30,6 +30,10 @@ do_configure() { do_build() { rake build } +do_check() { + ./subtle -v >/dev/null +} + do_install() { rake install } From cd0ebeb4880ca9f4427ae06249bfdf7cd994a993 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 27 Aug 2026 18:02:28 -0700 Subject: [PATCH 16/16] runit-swap: drop metapackage, add do_check --- srcpkgs/runit-swap/template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcpkgs/runit-swap/template b/srcpkgs/runit-swap/template index 8c7ce085387b3a..82143e751829ab 100644 --- a/srcpkgs/runit-swap/template +++ b/srcpkgs/runit-swap/template @@ -1,8 +1,7 @@ # Template file for 'runit-swap' pkgname=runit-swap version=2.0.0 -revision=2 -metapackage=yes +revision=3 hostmakedepends="git" depends="runit bash util-linux>=2.26" short_desc="Script to manage swapspaces" @@ -13,6 +12,11 @@ conf_files="/etc/runit/swap.conf" distfiles="$homepage/archive/v$version.tar.gz" checksum=a66730777fb084564e7fae67f2017d775b757b6b6c0c319802f71bed2184e958 +do_check() { + # shell scripts only; validate syntax + bash -n runit-swap swap/run swap/finish +} + do_install() { vbin runit-swap vinstall swap.conf 644 etc/runit