| 1 |
# SPDX-License-Identifier: GPL-2.0-or-later |
| 2 |
# Copyright (C) 2019 - 2021 IƱigo Martinez <[email protected]> |
| 3 |
|
| 4 |
test_units = { |
| 5 |
'test-utils': {'dependencies': libutils_dep}, |
| 6 |
'test-firehose': {'dependencies': libfirehose_dep}, |
| 7 |
} |
| 8 |
|
| 9 |
test_env += { |
| 10 |
'G_TEST_BUILDDIR': meson.current_build_dir(), |
| 11 |
'G_TEST_SRCDIR': meson.current_source_dir(), |
| 12 |
} |
| 13 |
|
| 14 |
foreach test_name, test_args: test_units |
| 15 |
exe = executable( |
| 16 |
# FIXME: added `firm` prefix to avoid target name collision |
| 17 |
'firm-' + test_name, |
| 18 |
sources: test_name + '.c', |
| 19 |
include_directories: top_inc, |
| 20 |
c_args: '-DLIBQMI_GLIB_COMPILATION', |
| 21 |
kwargs: test_args, |
| 22 |
) |
| 23 |
|
| 24 |
test( |
| 25 |
test_name, |
| 26 |
exe, |
| 27 |
env: test_env, |
| 28 |
) |
| 29 |
endforeach |