[gnome-software] trivial: Fix self tests when gnome-shell is not running



commit b2b5d9a0de501faabe44a2b55241c00a77e86e36
Author: Richard Hughes <richard hughsie com>
Date:   Wed Oct 18 20:18:18 2017 +0100

    trivial: Fix self tests when gnome-shell is not running

 plugins/shell-extensions/gs-self-test.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/shell-extensions/gs-self-test.c b/plugins/shell-extensions/gs-self-test.c
index 0fc8679..1b53584 100644
--- a/plugins/shell-extensions/gs-self-test.c
+++ b/plugins/shell-extensions/gs-self-test.c
@@ -82,6 +82,12 @@ gs_plugins_shell_extensions_remote_func (GsPluginLoader *plugin_loader)
        g_autoptr(GsPluginJob) plugin_job = NULL;
        g_autoptr(AsStore) store = NULL;
 
+       /* no shell-extensions, abort */
+       if (!gs_plugin_loader_get_enabled (plugin_loader, "shell-extensions")) {
+               g_test_skip ("not enabled");
+               return;
+       }
+
        /* ensure files are removed */
        g_unlink (xml_fn);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]