[gnome-builder] app: ignore plugin loading with tests



commit 0bebbc4ec157def3f0ab48137dc2d6b5ae35cb92
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 19 17:23:49 2017 -0700

    app: ignore plugin loading with tests
    
    We will introduce new API to specify which tests to run.

 libide/application/ide-application-plugins.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libide/application/ide-application-plugins.c b/libide/application/ide-application-plugins.c
index 843fed6..9a9a8b7 100644
--- a/libide/application/ide-application-plugins.c
+++ b/libide/application/ide-application-plugins.c
@@ -321,6 +321,14 @@ ide_application_load_plugins (IdeApplication *self)
       if (!g_settings_get_boolean (settings, "enabled"))
         continue;
 
+      /*
+       * If we are running the unit tests, we don't want to load plugins here,
+       * but defer until the test is loading to perform the loading.  However,
+       * we do want all of the other machinery above to be setup.
+       */
+      if (self->mode == IDE_APPLICATION_MODE_TESTS)
+        continue;
+
       if (ide_application_can_load_plugin (self, plugin_info))
         {
           g_debug ("Loading plugin \"%s\"",


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