mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
tests: Fix umockdev version detection
Traceback (most recent call last):
File "/builds/libfprint/libfprint/tests/umockdev-test.py", line 17, in <module>
version = tuple(int(_) for _ in umockdev_version.split(b'.'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/libfprint/libfprint/tests/umockdev-test.py", line 17, in <genexpr>
version = tuple(int(_) for _ in umockdev_version.split(b'.'))
^^^^^^
ValueError: invalid literal for int() with base 10: b'g9049374\n'
This commit is contained in:
@@ -14,7 +14,7 @@ if len(sys.argv) != 2:
|
||||
# Check that umockdev is available
|
||||
try:
|
||||
umockdev_version = subprocess.check_output(['umockdev-run', '--version'])
|
||||
version = tuple(int(_) for _ in umockdev_version.split(b'.'))
|
||||
version = tuple(int(_) for _ in umockdev_version.split(b'.')[:3])
|
||||
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.')
|
||||
|
||||
Reference in New Issue
Block a user