GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit c02771d1 authored by Marco Trevisan's avatar Marco Trevisan Committed by Benjamin Berg
Browse files

goodixmoc: Add async identification test using on-owned deseralized prints

This simulates what fprintd does
parent 989d498e
......@@ -22,6 +22,13 @@ template =
def enroll_progress(*args):
print('enroll progress: ' + str(args))
def identify_done(dev, res):
global identified
identified = True
identify_match, identify_print = dev.identify_finish(res)
print('indentification_done: ', identify_match, identify_print)
assert identify_match.equal(identify_print)
# List, enroll, list, verify, identify, delete
p = d.enroll_sync(template, None, enroll_progress, None)
......@@ -35,15 +42,27 @@ assert stored[0].equal(p)
verify_res, verify_print = d.verify_sync(p)
print("verify done")
del p
assert verify_res == True
identify_match, identify_print = d.identify_sync(stored)
print("identify done")
assert identify_match.equal(identify_print)
identified = False
deserialized_prints = []
for p in stored:
assert deserialized_prints[-1].equal(p)
del stored
print('async identifying')
d.identify(deserialized_prints, callback=identify_done)
del deserialized_prints
while not identified:
print("delete done")
del d
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment