Commit graph

63 commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
fd8297306c tests/fprintd: Ensure that we get an error on early release
Ensure that we get an error when releasing a device that is in process of
enrollment, verification or identification
2020-03-17 17:09:19 +01:00
Marco Trevisan (Treviño)
0e993d92e2 device: Return 'verify-no-match' on cancelled verification
We were returning a 'verify-unknown-error' while we actually know what
happened, so better to return a soft operation failure.
2020-03-17 17:09:19 +01:00
Marco Trevisan (Treviño)
b312a5e540 device: Return 'enroll-failed' on cancelled enrollment
We were returning an 'enroll-unknown-error' while we actually know what
happened, so better to return a soft operation failure.
2020-03-17 17:09:19 +01:00
Marco Trevisan (Treviño)
c12778ec5b tests/fprintd: Verify that each enroll stage happens
Instead of automatically replying with the 'whorl' image for every enroll
state signal with result 'enroll-stage-passed', only perform the number
of required enroll stages and ensure that we get the expected results.

This also will allow to manually perform enroll steps in other tests.
2020-03-17 17:09:19 +01:00
Marco Trevisan (Treviño)
dbabd4d7d3 tests/fprintd: Deduplicate enrollment code 2020-03-17 15:54:14 +01:00
Marco Trevisan (Treviño)
db1865eb3e tests/fprintd: Deduplicate result wait code 2020-03-17 15:49:40 +01:00
Marco Trevisan (Treviño)
0994cc314e main: Ensure that a gcov flush happens on SIGTERM
When coverage is enabled fprintd test won't generate any .gcda file and so
apparently no data, this happens because gcov doesn't handle properly the
process termination when SIGTERM is used, and so when in fprintd.py we
terminate the process no coverage data is reported.

To avoid this, quit the main loop cleanly on SIGTERM, so that we will exit
from the main function cleanly, making libc to perform a gcov flush when we
exit the program.
2020-02-05 16:45:57 +01:00
Marco Trevisan (Treviño)
33a21b5089 tests/fprintd: Test error conditions on Claim()/Release() 2020-02-04 15:36:06 +01:00
Marco Trevisan (Treviño)
dd006382f5 tests/fprintd: Test ListEnrolledFingers() method 2020-02-04 15:33:09 +01:00
Marco Trevisan (Treviño)
a34432ccf9 tests/fprintd: Add assertFprintError to check errors 2020-02-04 15:28:57 +01:00
Marco Trevisan (Treviño)
f2804921a3 tests/fprintd: Use unittest assertions more often 2020-02-04 15:27:24 +01:00
Marco Trevisan (Treviño)
74577a6806 tests/fprintd: Add a FPrintdVirtualDeviceTest to avoid repeating setup 2020-02-04 15:21:50 +01:00
Benjamin Berg
74838f9efc tests: Add basic integration test
This test uses the virtual image driver included in libfprint for
testing.
2019-12-03 17:08:04 +01:00