mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
build: Add meson build system
Reuse the generated dbus interface .xml files from fprintd to avoid unnecessary copies.
This commit is contained in:
committed by
Bastien Nocera
parent
5c5849dca7
commit
eb6dbb6953
26
tests/pam/meson.build
Normal file
26
tests/pam/meson.build
Normal file
@ -0,0 +1,26 @@
|
||||
subdir('services')
|
||||
|
||||
tests = [
|
||||
'test_pam_fprintd',
|
||||
]
|
||||
|
||||
foreach t: tests
|
||||
test(t,
|
||||
python3,
|
||||
args: meson.current_source_dir() / t + '.py',
|
||||
suite: ['PAM'],
|
||||
depends: [
|
||||
pam_fprintd,
|
||||
pam_service_file,
|
||||
],
|
||||
env: [
|
||||
'TOPBUILDDIR=' + meson.build_root(),
|
||||
'TOPSRCDIR=' + meson.source_root(),
|
||||
'LD_PRELOAD=libpam_wrapper.so',
|
||||
'PAM_WRAPPER=1',
|
||||
'PAM_WRAPPER_SERVICE_DIR=' + meson.current_build_dir() / 'services',
|
||||
'G_DEBUG=fatal-warnings',
|
||||
],
|
||||
timeout: 60,
|
||||
)
|
||||
endforeach
|
||||
13
tests/pam/services/meson.build
Normal file
13
tests/pam/services/meson.build
Normal file
@ -0,0 +1,13 @@
|
||||
# Meson doesn't allow to have configure_file's as targets we depend on... Meh!
|
||||
pam_service_file = custom_target('pam_test_service_file',
|
||||
output: 'null',
|
||||
command: 'true',
|
||||
depends: pam_fprintd,
|
||||
depend_files: configure_file(
|
||||
input: 'fprintd-pam-test.in',
|
||||
output: 'fprintd-pam-test',
|
||||
configuration: configuration_data({
|
||||
'FPRINTDPAMPATH': pam_fprintd.full_path(),
|
||||
}),
|
||||
),
|
||||
)
|
||||
@ -163,7 +163,7 @@ class TestPamFprintd(dbusmock.DBusTestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
if 'PAM_WRAPPER_SERVICE_DIR' not in os.environ:
|
||||
print('Cannot run test without environment set correctly, run "make check" instead')
|
||||
print('Cannot run test without environment set correctly, run "meson test" instead')
|
||||
sys.exit(1)
|
||||
# set stream to sys.stderr to get debug output
|
||||
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
||||
|
||||
Reference in New Issue
Block a user