Skip to contentSkip to conversation

avahi: ptest: derive the test list from the Makefiles

PATCH New Pratik Farkase 1 participant 1 message Nov 18

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avahi: ptest: derive the test list from the Makefiles

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.

---
 meta/recipes-connectivity/avahi/avahi_0.9.bb | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)
meta/recipes-connectivity/avahi/avahi_0.9.bb +6 -14
index 44ec08d895..72be13885c 100644
@@ -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
 }
 
Signature · 1 line
2.43.0