mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
tests: Add basic unit tests for fp-context
Link the tests with the private library using an utils library that will be useful to share other tests functions
This commit is contained in:
@@ -48,6 +48,32 @@ if get_option('introspection')
|
||||
endforeach
|
||||
endif
|
||||
|
||||
if 'virtual_image' in drivers
|
||||
test_utils = static_library('fprint-test-utils',
|
||||
sources: ['test-utils.c'],
|
||||
dependencies: libfprint_private_dep,
|
||||
install: false)
|
||||
|
||||
unit_tests = [
|
||||
'fp-context',
|
||||
]
|
||||
|
||||
foreach test_name: unit_tests
|
||||
basename = 'test-' + test_name
|
||||
test_exe = executable(basename,
|
||||
sources: basename + '.c',
|
||||
dependencies: libfprint_private_dep,
|
||||
c_args: common_cflags,
|
||||
link_with: test_utils)
|
||||
test(test_name,
|
||||
find_program('test-runner.sh'),
|
||||
suite: ['unit-tests'],
|
||||
args: [test_exe],
|
||||
env: envs,
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
gdb = find_program('gdb', required: false)
|
||||
if gdb.found()
|
||||
add_test_setup('gdb',
|
||||
|
||||
Reference in New Issue
Block a user