meson,data: generate test service file
The test service file is used in the test-plugin-generic unit tests, which require the ModemManager daemon to be launched in a private test DBus session.
This commit is contained in:
@@ -221,6 +221,12 @@ if test "x$with_systemdsystemunitdir" != xno; then
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$SYSTEMD_UNIT_DIR" -a "$SYSTEMD_UNIT_DIR" != xno ])
|
||||
|
||||
|
||||
dnl subdir where plugins are built w.r.t abs_top_builddir, just because it's
|
||||
dnl different to what meson does
|
||||
PLUGIN_BUILD_SUBDIR="plugins/.libs"
|
||||
AC_SUBST(PLUGIN_BUILD_SUBDIR)
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl udev support (enabled by default)
|
||||
dnl
|
||||
|
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com>
|
||||
|
||||
subdir('tests')
|
||||
|
||||
service_conf = {
|
||||
'sbindir': mm_prefix / mm_sbindir,
|
||||
'MM_POLKIT_SERVICE': (enable_polkit ? 'polkit.service' : ''),
|
||||
|
13
data/tests/meson.build
Normal file
13
data/tests/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2022 Aleksander Morgado <aleksander@aleksander.es>
|
||||
|
||||
test_conf = {
|
||||
'abs_top_builddir': build_root,
|
||||
'PLUGIN_BUILD_SUBDIR': 'plugins/',
|
||||
}
|
||||
|
||||
configure_file(
|
||||
input: 'org.freedesktop.ModemManager1.service.in',
|
||||
output: '@BASENAME@',
|
||||
configuration: test_conf,
|
||||
)
|
@@ -2,4 +2,4 @@
|
||||
|
||||
[D-BUS Service]
|
||||
Name=org.freedesktop.ModemManager1
|
||||
Exec=@abs_top_builddir@/src/ModemManager --test-session --no-auto-scan --test-enable --test-plugin-dir="@abs_top_builddir@/plugins/.libs" --debug
|
||||
Exec=@abs_top_builddir@/src/ModemManager --test-session --no-auto-scan --test-enable --test-plugin-dir="@abs_top_builddir@/@PLUGIN_BUILD_SUBDIR@" --debug
|
||||
|
Reference in New Issue
Block a user