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:
Aleksander Morgado
2022-02-15 23:13:53 +01:00
parent dc9e28f3a6
commit a7e579cd7b
4 changed files with 22 additions and 1 deletions

View File

@@ -221,6 +221,12 @@ if test "x$with_systemdsystemunitdir" != xno; then
fi fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$SYSTEMD_UNIT_DIR" -a "$SYSTEMD_UNIT_DIR" != xno ]) 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-----------------------------------------------------------------------------
dnl udev support (enabled by default) dnl udev support (enabled by default)
dnl dnl

View File

@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com> # Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com>
subdir('tests')
service_conf = { service_conf = {
'sbindir': mm_prefix / mm_sbindir, 'sbindir': mm_prefix / mm_sbindir,
'MM_POLKIT_SERVICE': (enable_polkit ? 'polkit.service' : ''), 'MM_POLKIT_SERVICE': (enable_polkit ? 'polkit.service' : ''),

13
data/tests/meson.build Normal file
View 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,
)

View File

@@ -2,4 +2,4 @@
[D-BUS Service] [D-BUS Service]
Name=org.freedesktop.ModemManager1 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