tests: add identify test for driver goodixmoc

add identify ioctl file, modify custom.py add identify test
This commit is contained in:
boger.wang
2020-09-13 21:14:05 +08:00
committed by Benjamin Berg
parent f67f61c638
commit 3962372f47
2 changed files with 16 additions and 2 deletions

6
tests/goodixmoc/custom.py Normal file → Executable file
View File

@@ -22,7 +22,7 @@ template = FPrint.Print.new(d)
def enroll_progress(*args):
print('enroll progress: ' + str(args))
# List, enroll, list, verify, delete
# List, enroll, list, verify, identify, delete
print("enrolling")
p = d.enroll_sync(template, None, enroll_progress, None)
print("enroll done")
@@ -36,6 +36,10 @@ print("verifying")
verify_res, verify_print = d.verify_sync(p)
print("verify done")
assert verify_res == True
print("identifying")
identify_match, identify_print = d.identify_sync(stored)
print("identify done")
assert identify_match.equal(identify_print)
print("deleting")
d.delete_print_sync(p)