From e782de374792a3e23bf16a6fa20b1259d0f2981d Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 16 Aug 2022 15:31:13 +0200 Subject: [PATCH] tests: Fix umockdev version detection Traceback (most recent call last): File "/builds/libfprint/libfprint/tests/umockdev-test.py", line 17, in version = tuple(int(_) for _ in umockdev_version.split(b'.')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builds/libfprint/libfprint/tests/umockdev-test.py", line 17, in version = tuple(int(_) for _ in umockdev_version.split(b'.')) ^^^^^^ ValueError: invalid literal for int() with base 10: b'g9049374\n' --- tests/umockdev-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/umockdev-test.py b/tests/umockdev-test.py index b70f3ee2..66ab0f57 100755 --- a/tests/umockdev-test.py +++ b/tests/umockdev-test.py @@ -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.')