diff mbox series

[meta-python,06/16] python3-pydbus: skip ptest cases gracefully when dbus-launch is missing

Message ID 20260829001108.559544-6-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-python,01/16] python3-bleak: fetch git tag with tests/ for ptest instead of PyPI sdist | expand

Commit Message

Khem Raj Aug. 29, 2026, 12:10 a.m. UTC
From: Khem Raj <raj.khem@gmail.com>

Guard each shell test case with a dbus-launch availability check and
emit SKIP instead of hard-failing when it isn't installed.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-python/recipes-devtools/python/python3-pydbus/run-ptest | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-pydbus/run-ptest b/meta-python/recipes-devtools/python/python3-pydbus/run-ptest
index 782ceed3bb..51e5a958da 100644
--- a/meta-python/recipes-devtools/python/python3-pydbus/run-ptest
+++ b/meta-python/recipes-devtools/python/python3-pydbus/run-ptest
@@ -1,6 +1,10 @@ 
 #!/bin/sh
 
 for case in `find tests -type f -name '*.sh'`; do
+    if ! command -v dbus-launch >/dev/null 2>&1; then
+        echo "SKIP: ${case} (dbus-launch not installed)"
+        continue
+    fi
     bash $case python3 >$case.output 2>&1
     ret=$?
     if [ $ret -ne 0 ]; then