mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-27 19:33:06 -04:00
If we're building libglnx as a subproject in a larger project, we won't necessarily want to run these. Signed-off-by: Simon McVittie <smcv@collabora.com>
47 lines
876 B
Meson
47 lines
876 B
Meson
# Copyright 2019 Endless OS Foundation LLC
|
|
# Copyright 2019 Collabora Ltd.
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
libglnx_testlib = static_library(
|
|
'glnx-testlib',
|
|
'libglnx-testlib.c',
|
|
'libglnx-testlib.h',
|
|
dependencies : [
|
|
libglnx_dep,
|
|
libglnx_deps,
|
|
],
|
|
install : false,
|
|
)
|
|
libglnx_testlib_dep = declare_dependency(
|
|
dependencies : [
|
|
libglnx_dep,
|
|
libglnx_deps,
|
|
],
|
|
include_directories : include_directories('.'),
|
|
link_with : libglnx_testlib,
|
|
)
|
|
|
|
if get_option('tests')
|
|
test_names = [
|
|
'errors',
|
|
'fdio',
|
|
'macros',
|
|
'shutil',
|
|
'xattrs',
|
|
]
|
|
|
|
foreach test_name : test_names
|
|
exe = executable(test_name,
|
|
[
|
|
'test-libglnx-' + test_name + '.c',
|
|
],
|
|
dependencies: [
|
|
libglnx_dep,
|
|
libglnx_deps,
|
|
libglnx_testlib_dep,
|
|
],
|
|
)
|
|
test(test_name, exe)
|
|
endforeach
|
|
endif
|