2018-10-06 01:47:45 +02:00
|
|
|
deps = [
|
|
|
|
dependency('gio-2.0', version: '>= 2.44'),
|
2018-12-10 16:09:51 +01:00
|
|
|
dependency('gio-unix-2.0', version: '>= 2.44'),
|
2018-10-06 01:47:45 +02:00
|
|
|
dependency('glib-2.0', version: '>= 2.54.2'),
|
|
|
|
dependency('gobject-2.0', version: '>= 2.44'),
|
|
|
|
libeos_parental_controls_dep,
|
2018-12-10 16:09:51 +01:00
|
|
|
libglib_testing_dep,
|
2018-10-06 01:47:45 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
envs = test_env + [
|
|
|
|
'G_TEST_SRCDIR=' + meson.current_source_dir(),
|
|
|
|
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
|
|
|
|
]
|
|
|
|
|
|
|
|
test_programs = [
|
2018-12-10 16:09:51 +01:00
|
|
|
['app-filter', ['accounts-service-iface.h'], deps],
|
2018-10-06 01:47:45 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
installed_tests_metadir = join_paths(datadir, 'installed-tests',
|
|
|
|
'libeos-parental-controls-' + libeos_parental_controls_api_version)
|
|
|
|
installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
|
|
|
|
'libeos-parental-controls-' + libeos_parental_controls_api_version)
|
|
|
|
|
|
|
|
foreach program: test_programs
|
|
|
|
test_conf = configuration_data()
|
|
|
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
|
|
|
test_conf.set('program', program[0])
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input: test_template,
|
|
|
|
output: program[0] + '.test',
|
|
|
|
install: enable_installed_tests,
|
|
|
|
install_dir: installed_tests_metadir,
|
|
|
|
configuration: test_conf,
|
|
|
|
)
|
|
|
|
|
|
|
|
exe = executable(
|
|
|
|
program[0],
|
|
|
|
[program[0] + '.c'] + program[1],
|
|
|
|
dependencies: program[2],
|
|
|
|
include_directories: root_inc,
|
|
|
|
install: enable_installed_tests,
|
|
|
|
install_dir: installed_tests_execdir,
|
|
|
|
)
|
|
|
|
|
|
|
|
test(
|
|
|
|
program[0],
|
|
|
|
exe,
|
|
|
|
env: envs,
|
|
|
|
args: ['--tap'],
|
|
|
|
)
|
|
|
|
endforeach
|