sdcp-device: Use predictable keys and random numbers for testing

If FP_DEVICE_EMULATION is set, then switch to using predictable EC
ephemeral key and random numbers. This should allow recording and
replaying real device interactions using umockdev.
This commit is contained in:
Benjamin Berg
2020-11-03 13:44:55 +01:00
parent 39e060a71b
commit 67723675d2
2 changed files with 84 additions and 19 deletions

View File

@@ -116,6 +116,8 @@ if get_option('introspection')
unit_tests = ['virtual-sdcp']
endif
sdcp_envs = envs
sdcp_envs.set('FP_DEVICE_EMULATION', '0')
foreach ut: unit_tests
ut_suite = suite
ut_args = base_args
@@ -128,7 +130,7 @@ if get_option('introspection')
args: ut_args,
suite: ut_suite,
depends: libfprint_typelib,
env: envs,
env: sdcp_envs,
)
endforeach
else