mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
tests: Skip umockdev based test for missing dependencies
Also print a warning if umockdev-run is too old. Note that we still try to run the unreliable tests as they are still useful for development.
This commit is contained in:
@@ -10,6 +10,18 @@ import subprocess
|
|||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
print("You need to specify exactly one argument, the directory with test data")
|
print("You need to specify exactly one argument, the directory with test data")
|
||||||
|
|
||||||
|
# Check that umockdev is available
|
||||||
|
try:
|
||||||
|
umockdev_version = subprocess.check_output(['umockdev-run', '--version'])
|
||||||
|
version = tuple(int(_) for _ in umockdev_version.split(b'.'))
|
||||||
|
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.')
|
||||||
|
except FileNotFoundError:
|
||||||
|
print('umockdev-run not found, skipping test!')
|
||||||
|
print('Please install umockdev.')
|
||||||
|
sys.exit(77)
|
||||||
|
|
||||||
edir = os.path.dirname(sys.argv[0])
|
edir = os.path.dirname(sys.argv[0])
|
||||||
ddir = sys.argv[1]
|
ddir = sys.argv[1]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user