diff mbox series

avahi: ptest: derive the test list from the Makefiles

Message ID 20261118124819.64437-1-pratik.farkase@est.tech
State New
Headers show
Series avahi: ptest: derive the test list from the Makefiles | expand

Commit Message

Pratik Farkase Nov. 18, 2026, 12:48 p.m. UTC
Instead of naming each test in the recipe, install the programs listed in
the TESTS variable of every directory in SUBDIRS. Tests added upstream are
then picked up without a recipe change, and this adds the three tests that
were not listed before: watch-test, watch-test-thread and glib-watch-test.

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
 meta/recipes-connectivity/avahi/avahi_0.9.bb | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/avahi/avahi_0.9.bb b/meta/recipes-connectivity/avahi/avahi_0.9.bb
index 44ec08d895..72be13885c 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.9.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.9.bb
@@ -87,22 +87,14 @@  do_compile:prepend() {
 
 RRECOMMENDS:${PN}:append:libc-glibc = " avahi-libnss-mdns"
 
-AVAHI_PTESTS = " \
-    avahi-common/strlst-test \
-    avahi-common/domain-test \
-    avahi-common/alternative-test \
-    avahi-common/timeval-test \
-    avahi-common/utf8-test \
-    avahi-core/dns-spin-test \
-    avahi-core/dns-test \
-    avahi-core/hashmap-test \
-"
-
 do_install_ptest() {
     install -d ${D}${PTEST_PATH}/tests
-    for t in ${AVAHI_PTESTS}; do
-        ${B}/libtool --mode=install install -m 0755 ${B}/$t \
-            ${D}${PTEST_PATH}/tests/$(basename $t)
+    for d in $(makefile-getvar ${B}/Makefile SUBDIRS); do
+        [ -f ${B}/$d/Makefile ] || continue
+        for t in $(makefile-getvar ${B}/$d/Makefile TESTS); do
+            ${B}/libtool --mode=install install -m 0755 ${B}/$d/$t \
+                ${D}${PTEST_PATH}/tests/$t
+        done
     done
 }