[PATCH 1/2] tests: Skip busctl tests when not available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
 tests/hwsim/test_dbus.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py
index e9d6b9e39c25..60de49d1da19 100644
--- a/tests/hwsim/test_dbus.py
+++ b/tests/hwsim/test_dbus.py
@@ -9,6 +9,7 @@ import logging
 logger = logging.getLogger()
 import subprocess
 import time
+import shutil
 import struct
 import sys
 
@@ -5355,6 +5356,8 @@ def test_dbus_introspect(dev, apdev):
             raise Exception("Unexpected Introspect response")
 
 def run_busctl(service, obj):
+    if not shutil.which("busctl"):
+        raise HwsimSkip("No busctl available")
     logger.info("busctl introspect %s %s" % (service, obj))
     cmd = subprocess.Popen(['busctl', 'introspect', service, obj],
                            stdout=subprocess.PIPE,
-- 
2.27.0.212.ge8ba1cc988-goog


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux