From 2ba60d0a520f4201f558928376da65ecd76b0dd7 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Fri, 25 Jun 2021 10:02:09 +0200 Subject: [PATCH] tests: Improved umockdev version check The new features will be added in 0.16, so match against that. Also, match against CI_PROJECT_NAME to detect our CI environment (and assume that umockdev has been patched to the point of supporting all tests). --- 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 45f19d0..b295800 100755 --- a/tests/umockdev-test.py +++ b/tests/umockdev-test.py @@ -18,8 +18,8 @@ try: if version < (0, 13, 2): print('umockdev is too old for test to be reliable, expect random failures!') print('Please update umockdev to at least 0.13.2.') - pcap_supported = version >= (0, 15, 6) or os.getenv('CI_COMMIT_SHA') is not None - spi_supported = version >= (0, 15, 6) or os.getenv('CI_COMMIT_SHA') is not None + pcap_supported = version >= (0, 16) or os.getenv('CI_PROJECT_NAME') == "libfprint" + spi_supported = version >= (0, 16) or os.getenv('CI_PROJECT_NAME') == "libfprint" except FileNotFoundError: print('umockdev-run not found, skipping test!')