From e075d37590d553faada12973dcb2adbb955a0086 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Thu, 1 Oct 2020 14:14:02 +0200 Subject: tests: Check that a verify operation can be immediately restarted This excercises the path where we early-report a result and the VerifyStop call must wait for the operation to complete intenernally. Note that this test cannot fail right now due to the FpImageDevice internal code still trying to hide the deactivation delay internally. See libfprint!174 --- tests/fprintd.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/fprintd.py b/tests/fprintd.py index 9406fd9..0be7776 100755 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -742,6 +742,23 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest): self.assertEqual(self._last_result, 'verify-no-match') self.device.VerifyStop() + def test_verify_finger_no_match_restart(self): + self.enroll_image('whorl', finger='left-thumb') + self.device.VerifyStart('(s)', 'left-thumb') + self.send_image('tented_arch') + self.wait_for_result() + self.assertTrue(self._verify_stopped) + self.assertEqual(self._last_result, 'verify-no-match') + self.device.VerifyStop() + + # Immediately starting again after a no-match must work + self.device.VerifyStart('(s)', 'left-thumb') + self.send_image('whorl') + self.wait_for_result() + self.assertTrue(self._verify_stopped) + self.assertEqual(self._last_result, 'verify-match') + self.device.VerifyStop() + def test_verify_wrong_finger_match(self): self.enroll_image('whorl', finger='left-thumb') self.device.VerifyStart('(s)', 'left-toe') -- cgit v1.2.3