aboutsummaryrefslogtreecommitdiff
path: root/src/mm-context.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2022-10-27 22:08:37 +0000
committerAleksander Morgado <aleksandermj@chromium.org>2022-11-07 14:25:34 +0000
commit634f6cbcbc424a557625e3d2eb01ef0694948e25 (patch)
tree18342d8ec232893b28c0432ff78313448777f079 /src/mm-context.c
parent7ea2452b1e4ff3f572dd93e00a01868a663b3cc4 (diff)
build: disable Test interface in base manager if building without tests
There is no real need for this interface if tests are not being built.
Diffstat (limited to 'src/mm-context.c')
-rw-r--r--src/mm-context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-context.c b/src/mm-context.c
index 5571d742..92f8ffd4 100644
--- a/src/mm-context.c
+++ b/src/mm-context.c
@@ -226,7 +226,9 @@ mm_context_get_log_personal_info (void)
/* Test context */
static gboolean test_session;
+#if defined WITH_TESTS
static gboolean test_enable;
+#endif
static gchar *test_plugin_dir;
#if defined WITH_UDEV
static gboolean test_no_udev;
@@ -249,11 +251,13 @@ static const GOptionEntry test_entries[] = {
"Run in session DBus",
NULL
},
+#if defined WITH_TESTS
{
"test-enable", 0, 0, G_OPTION_ARG_NONE, &test_enable,
"Enable the Test interface in the daemon",
NULL
},
+#endif
{
"test-plugin-dir", 0, 0, G_OPTION_ARG_FILENAME, &test_plugin_dir,
"Path to look for plugins",
@@ -320,11 +324,13 @@ mm_context_get_test_session (void)
return test_session;
}
+#if defined WITH_TESTS
gboolean
mm_context_get_test_enable (void)
{
return test_enable;
}
+#endif
const gchar *
mm_context_get_test_plugin_dir (void)