| 1 |
# SPDX-FileCopyrightText: 2026 Dr. Tobias Quathamer <[email protected]> |
| 2 |
# |
| 3 |
# SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
# Include the source directory for header files |
| 6 |
src_inc = include_directories('../src') |
| 7 |
src_files = files('../src/options.c') |
| 8 |
|
| 9 |
tests = ['options.c', 'integration.c'] |
| 10 |
|
| 11 |
foreach test_name : tests |
| 12 |
test_exe = executable( |
| 13 |
test_name.split('.')[0], |
| 14 |
sources: [test_name, src_files], |
| 15 |
include_directories: src_inc, |
| 16 |
dependencies: [glib_dep, json_dep], |
| 17 |
) |
| 18 |
|
| 19 |
test( |
| 20 |
test_name.split('.')[0], |
| 21 |
test_exe, |
| 22 |
protocol: 'tap', |
| 23 |
env: [ |
| 24 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 25 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), |
| 26 |
], |
| 27 |
) |
| 28 |
endforeach |