From 98070190969341500adb92289a388cb090fdffed Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Jul 2019 13:32:15 +1000 Subject: [PATCH] tools: skip the event tests for eventless recordings in the YAML verifier When verifying a recording, let's skip those tests that require events but don't have any. Signed-off-by: Peter Hutterer --- tools/libinput-record-verify-yaml.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/libinput-record-verify-yaml.py b/tools/libinput-record-verify-yaml.py index 30ed1904..a1f6e9d5 100755 --- a/tools/libinput-record-verify-yaml.py +++ b/tools/libinput-record-verify-yaml.py @@ -51,6 +51,8 @@ class TestYaml(unittest.TestCase): devices = self.yaml['devices'] for d in devices: events = d['events'] + if not events: + raise unittest.SkipTest() for e in events: try: libinput = e['libinput'] @@ -183,6 +185,8 @@ class TestYaml(unittest.TestCase): devices = self.yaml['devices'] for d in devices: events = d['events'] + if not events: + raise unittest.SkipTest() for e in events: self.assertTrue('evdev' in e or 'libinput' in e) @@ -190,6 +194,8 @@ class TestYaml(unittest.TestCase): devices = self.yaml['devices'] for d in devices: events = d['events'] + if not events: + raise unittest.SkipTest() for e in events: try: evdev = e['evdev'] @@ -210,6 +216,8 @@ class TestYaml(unittest.TestCase): devices = self.yaml['devices'] for d in devices: events = d['events'] + if not events: + raise unittest.SkipTest() for e in events: try: evdev = e['evdev'] @@ -222,6 +230,8 @@ class TestYaml(unittest.TestCase): devices = self.yaml['devices'] for d in devices: events = d['events'] + if not events: + raise unittest.SkipTest() for e in events: try: libinput = e['libinput'] @@ -373,6 +383,8 @@ class TestYaml(unittest.TestCase): devices = self.yaml['devices'] for d in devices: events = d['events'] + if not events: + raise unittest.SkipTest() for e in events: try: evdev = e['libinput']