[gnome-builder] tests: include Ide-1.0.gir and typelib to search path.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] tests: include Ide-1.0.gir and typelib to search path.
- Date: Tue, 24 Mar 2015 23:00:45 +0000 (UTC)
commit b5572c7b2b21d9f0ea06d8acfb089f0ef9cdd109
Author: Garrett Regier <garrettregier gmail com>
Date: Tue Mar 24 16:00:35 2015 -0700
tests: include Ide-1.0.gir and typelib to search path.
tests/test-ide-buffer-manager.c | 4 ++++
tests/test-ide-buffer.c | 4 ++++
tests/test-ide-context.c | 4 ++++
tests/test-ide-source-view.c | 5 +++++
tests/tests.mk | 15 ++++++++++-----
5 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/tests/test-ide-buffer-manager.c b/tests/test-ide-buffer-manager.c
index b292563..91fcf31 100644
--- a/tests/test-ide-buffer-manager.c
+++ b/tests/test-ide-buffer-manager.c
@@ -20,6 +20,7 @@
#include <glib.h>
#include <glib/gstdio.h>
+#include <girepository.h>
#include <ide.h>
typedef struct
@@ -195,6 +196,9 @@ main (gint argc,
{
gtk_init (&argc, &argv);
g_test_init (&argc, &argv, NULL);
+ g_irepository_require_private (g_irepository_get_default (),
+ BUILDDIR,
+ "Ide", "1.0", 0, NULL);
g_test_add_func ("/Ide/BufferManager/basic", test_buffer_manager_basic);
return g_test_run ();
}
diff --git a/tests/test-ide-buffer.c b/tests/test-ide-buffer.c
index f0d77f9..a9cf76a 100644
--- a/tests/test-ide-buffer.c
+++ b/tests/test-ide-buffer.c
@@ -20,6 +20,7 @@
#include <glib.h>
#include <glib/gstdio.h>
+#include <girepository.h>
#include <ide.h>
typedef struct
@@ -143,6 +144,9 @@ main (gint argc,
{
gtk_init (&argc, &argv);
g_test_init (&argc, &argv, NULL);
+ g_irepository_require_private (g_irepository_get_default (),
+ BUILDDIR,
+ "Ide", "1.0", 0, NULL);
g_test_add_func ("/Ide/Buffer/basic", test_buffer_basic);
return g_test_run ();
}
diff --git a/tests/test-ide-context.c b/tests/test-ide-context.c
index 37b026c..fdd96df 100644
--- a/tests/test-ide-context.c
+++ b/tests/test-ide-context.c
@@ -18,6 +18,7 @@
#include "tests.h"
+#include <girepository.h>
#include <ide.h>
typedef struct
@@ -83,6 +84,9 @@ main (gint argc,
gchar *argv[])
{
g_test_init (&argc, &argv, NULL);
+ g_irepository_require_private (g_irepository_get_default (),
+ BUILDDIR,
+ "Ide", "1.0", 0, NULL);
g_test_add_func ("/Ide/Context/new_async", test_new_async);
return g_test_run ();
}
diff --git a/tests/test-ide-source-view.c b/tests/test-ide-source-view.c
index c74b5bc..3c1c6ae 100644
--- a/tests/test-ide-source-view.c
+++ b/tests/test-ide-source-view.c
@@ -24,6 +24,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <stdlib.h>
+#include <girepository.h>
#define ADD_CLASS(widget,name) \
gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(widget)), name)
@@ -724,6 +725,10 @@ main (int argc,
{ NULL }
};
+ g_irepository_require_private (g_irepository_get_default (),
+ BUILDDIR,
+ "Ide", "1.0", 0, NULL);
+
ide_set_program_name ("gnome-builder");
ide_log_init (TRUE, NULL);
diff --git a/tests/tests.mk b/tests/tests.mk
index 3aa7377..68819a8 100644
--- a/tests/tests.mk
+++ b/tests/tests.mk
@@ -10,7 +10,8 @@ TESTS += test-ide-context
test_ide_context_SOURCES = tests/test-ide-context.c
test_ide_context_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
+ -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\"" \
+ -DBUILDDIR="\"$(abs_top_builddir)\""
test_ide_context_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -19,7 +20,8 @@ TESTS += test-ide-back-forward-list
test_ide_back_forward_list_SOURCES = tests/test-ide-back-forward-list.c
test_ide_back_forward_list_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
+ -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\"" \
+ -DBUILDDIR="\"$(abs_top_builddir)\""
test_ide_back_forward_list_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -28,7 +30,8 @@ TESTS += test-ide-buffer-manager
test_ide_buffer_manager_SOURCES = tests/test-ide-buffer-manager.c
test_ide_buffer_manager_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
+ -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\"" \
+ -DBUILDDIR="\"$(abs_top_builddir)\""
test_ide_buffer_manager_LDADD = libide-1.0.la $(LIBIDE_LIBS)
noinst_PROGRAMS += test-ide-buffer
@@ -36,7 +39,8 @@ TESTS += test-ide-buffer
test_ide_buffer_SOURCES = tests/test-ide-buffer.c
test_ide_buffer_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
+ -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\"" \
+ -DBUILDDIR="\"$(abs_top_builddir)\""
test_ide_buffer_LDADD = libide-1.0.la $(LIBIDE_LIBS)
@@ -44,7 +48,8 @@ noinst_PROGRAMS += test-ide-source-view
test_ide_source_view_SOURCES = tests/test-ide-source-view.c
test_ide_source_view_CFLAGS = \
$(libide_1_0_la_CFLAGS) \
- -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\""
+ -DTEST_DATA_DIR="\"$(top_srcdir)/tests/data\"" \
+ -DBUILDDIR="\"$(abs_top_builddir)\""
test_ide_source_view_LDADD = libide-1.0.la $(LIBIDE_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]