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).
This commit is contained in:
Benjamin Berg 2021-06-25 10:02:09 +02:00 committed by Benjamin Berg
parent 947420d2ce
commit 2ba60d0a52

View file

@ -18,8 +18,8 @@ try:
if version < (0, 13, 2): if version < (0, 13, 2):
print('umockdev is too old for test to be reliable, expect random failures!') print('umockdev is too old for test to be reliable, expect random failures!')
print('Please update umockdev to at least 0.13.2.') 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 pcap_supported = version >= (0, 16) or os.getenv('CI_PROJECT_NAME') == "libfprint"
spi_supported = version >= (0, 15, 6) or os.getenv('CI_COMMIT_SHA') is not None spi_supported = version >= (0, 16) or os.getenv('CI_PROJECT_NAME') == "libfprint"
except FileNotFoundError: except FileNotFoundError:
print('umockdev-run not found, skipping test!') print('umockdev-run not found, skipping test!')