From d5fda36bc03e2a519f4041d0f3f7e62de8335432 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 28 Jun 2021 16:16:31 +0200 Subject: [PATCH] tests: Detect tests by checking any matching file prefix We were testing only for .ioctl files, but we may now have .pcap file and ended up simply not running the synaptics test unless there was still a .ioctl file present. --- tests/umockdev-test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/umockdev-test.py b/tests/umockdev-test.py index b295800..4783f10 100755 --- a/tests/umockdev-test.py +++ b/tests/umockdev-test.py @@ -111,10 +111,10 @@ def custom(): ['%s' % os.path.join(ddir, "custom.py")]) try: - if os.path.exists(os.path.join(ddir, "capture.ioctl")): + if glob.glob(os.path.join(ddir, "capture.*")): capture() - if os.path.exists(os.path.join(ddir, "custom.ioctl")): + if glob.glob(os.path.join(ddir, "custom.*")): custom() except Exception as e: