mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 04:13:33 +02:00
tests: Skip hotplug test if "removed" property does not exist
The test requires libfprint 1.90.4 to work, otherwise it will just hang forever.
This commit is contained in:
@ -138,6 +138,8 @@ class FPrintdTest(dbusmock.DBusTestCase):
|
|||||||
fprintd = None
|
fprintd = None
|
||||||
cls._polkitd = None
|
cls._polkitd = None
|
||||||
|
|
||||||
|
cls._has_hotplug = FPrint.Device.find_property("removed") is not None
|
||||||
|
|
||||||
if 'FPRINT_BUILD_DIR' in os.environ:
|
if 'FPRINT_BUILD_DIR' in os.environ:
|
||||||
print('Testing local build')
|
print('Testing local build')
|
||||||
build_dir = os.environ['FPRINT_BUILD_DIR']
|
build_dir = os.environ['FPRINT_BUILD_DIR']
|
||||||
@ -688,6 +690,9 @@ class FPrintdVirtualDeviceTest(FPrintdVirtualDeviceBaseTest):
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
def test_removal_during_enroll(self):
|
def test_removal_during_enroll(self):
|
||||||
|
if not self._has_hotplug:
|
||||||
|
self.skipTest("libfprint is too old for hotplug")
|
||||||
|
|
||||||
self._polkitd_obj.SetAllowed(['net.reactivated.fprint.device.setusername',
|
self._polkitd_obj.SetAllowed(['net.reactivated.fprint.device.setusername',
|
||||||
'net.reactivated.fprint.device.enroll'])
|
'net.reactivated.fprint.device.enroll'])
|
||||||
self.device.Claim('(s)', 'testuser')
|
self.device.Claim('(s)', 'testuser')
|
||||||
|
|||||||
Reference in New Issue
Block a user