From: Brian Norris Date: Thu, 25 Jun 2020 20:22:01 +0000 (-0700) Subject: tests: Skip busctl tests when not available X-Git-Tag: hostap_2_10~878 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dbba548ae5b3a5ebf6ca7400666a2180c691d13;p=thirdparty%2Fhostap.git tests: Skip busctl tests when not available Signed-off-by: Brian Norris --- diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 65ebe7da7..4958048ae 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 @@ -5354,6 +5355,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,