mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Skip busctl tests when not available
Signed-off-by: Brian Norris <briannorris@chromium.org>
This commit is contained in:
parent
2818e9ca90
commit
4dbba548ae
@ -9,6 +9,7 @@ import logging
|
|||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
import shutil
|
||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -5354,6 +5355,8 @@ def test_dbus_introspect(dev, apdev):
|
|||||||
raise Exception("Unexpected Introspect response")
|
raise Exception("Unexpected Introspect response")
|
||||||
|
|
||||||
def run_busctl(service, obj):
|
def run_busctl(service, obj):
|
||||||
|
if not shutil.which("busctl"):
|
||||||
|
raise HwsimSkip("No busctl available")
|
||||||
logger.info("busctl introspect %s %s" % (service, obj))
|
logger.info("busctl introspect %s %s" % (service, obj))
|
||||||
cmd = subprocess.Popen(['busctl', 'introspect', service, obj],
|
cmd = subprocess.Popen(['busctl', 'introspect', service, obj],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user