Commit 96cce33a authored by Christian Hergert's avatar Christian Hergert

build: link tests against plugins .so

We need access to the plugins contained in the .so for the tests to
complete properly.
parent 0e62131a
......@@ -22,12 +22,10 @@
#include <gtksourceview/gtksource.h>
#include "application/ide-application-private.h"
#include "plugins/gnome-builder-plugins.h"
#include "bug-buddy.h"
/* Keep in sync with gnome-builder-plugins.c */
extern void gnome_builder_plugins_init (void);
static IdeApplicationMode early_mode;
static gboolean
......
/* gnome-builder-plugins.h
*
* Copyright (C) 2017 Christian Hergert <chergert@redhat.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <glib.h>
G_BEGIN_DECLS
void gnome_builder_plugins_init (void);
G_END_DECLS
......@@ -16,6 +16,7 @@ ide_test_cflags = [
ide_test_deps = [
libide_dep,
libpeas_dep,
gnome_builder_plugins_dep,
]
ide_context = executable('test-ide-context',
......
......@@ -21,6 +21,7 @@
#include <ide.h>
#include "application/ide-application-tests.h"
#include "../plugins/gnome-builder-plugins.h"
static gint save_count;
static gint load_count;
......@@ -184,6 +185,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/BufferManager/basic", test_buffer_manager_basic, NULL, required_plugins);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -23,6 +23,7 @@
#include <ide.h>
#include "application/ide-application-tests.h"
#include "../src/plugins/gnome-builder-plugins.h"
static void
test_buffer_basic_cb2 (GObject *object,
......@@ -115,6 +116,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/Buffer/basic", test_buffer_basic, NULL, required_plugins);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -21,6 +21,7 @@
#include <ide.h>
#include "application/ide-application-tests.h"
#include "plugins/gnome-builder-plugins.h"
static void
execute_cb (GObject *object,
......@@ -116,6 +117,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/BuildPipeline/basic", test_build_pipeline, NULL);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -20,6 +20,8 @@
#include "application/ide-application-tests.h"
#include "../plugins/gnome-builder-plugins.h"
static void
test_new_async_cb1 (GObject *object,
GAsyncResult *result,
......@@ -82,6 +84,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/Context/new_async", test_new_async, NULL, required_plugins);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -21,6 +21,8 @@
#include "application/ide-application-tests.h"
#include "editorconfig/ide-editorconfig-file-settings.h"
#include "../plugins/gnome-builder-plugins.h"
static void
test_filesettings (GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -176,6 +178,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/FileSettings/basic", test_filesettings, NULL, required_plugins);
ide_application_add_test (app, "/Ide/EditorconfigFileSettings/basic", test_editorconfig, NULL, required_plugins);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -21,6 +21,7 @@
#include <string.h>
#include "application/ide-application-tests.h"
#include "../plugins/gnome-builder-plugins.h"
typedef void (*IndentTestFunc) (IdeContext *context,
GtkWidget *widget);
......@@ -181,6 +182,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/CIndenter/basic", test_cindenter_basic, NULL, required_plugins);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -20,6 +20,7 @@
#include <string.h>
#include "application/ide-application-tests.h"
#include "plugins/gnome-builder-plugins.h"
#include "snippets/ide-source-snippet-private.h"
#include "util/ide-gdk.h"
......@@ -315,6 +316,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/Snippets/basic", test_snippets_basic, NULL);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
......@@ -21,6 +21,8 @@
#include "application/ide-application-tests.h"
#include "../plugins/gnome-builder-plugins.h"
typedef void (*VimTestFunc) (IdeContext *context,
GtkWidget *widget);
......@@ -190,6 +192,7 @@ main (gint argc,
app = ide_application_new ();
ide_application_add_test (app, "/Ide/Vim/basic", test_vim_basic, NULL, required_plugins);
gnome_builder_plugins_init ();
ret = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment