gobject-introspection r705 - in trunk: . tests/repository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r705 - in trunk: . tests/repository
- Date: Tue, 14 Oct 2008 18:22:20 +0000 (UTC)
Author: walters
Date: Tue Oct 14 18:22:19 2008
New Revision: 705
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=705&view=rev
Log:
Prepend search path for $(top_builddir)/gir dir
Modified:
trunk/ChangeLog
trunk/tests/repository/Makefile.am
trunk/tests/repository/gitestrepo.c
Modified: trunk/tests/repository/Makefile.am
==============================================================================
--- trunk/tests/repository/Makefile.am (original)
+++ trunk/tests/repository/Makefile.am Tue Oct 14 18:22:19 2008
@@ -8,5 +8,5 @@
gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
gitestrepo_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
-TESTS = #gitestrepo
-TESTS_ENVIRONMENT=env XDG_DATA_DIRS=$(top_builddir)/gir
+TESTS = gitestrepo
+TESTS_ENVIRONMENT=env top_builddir="$(top_builddir)"
\ No newline at end of file
Modified: trunk/tests/repository/gitestrepo.c
==============================================================================
--- trunk/tests/repository/gitestrepo.c (original)
+++ trunk/tests/repository/gitestrepo.c Tue Oct 14 18:22:19 2008
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <unistd.h>
-int
+int
main(int argc, char **argv)
{
GIRepository *repo;
@@ -12,11 +12,16 @@
GError *error = NULL;
GIBaseInfo *info;
GType gtype;
+ char *girdir;
g_type_init ();
repo = g_irepository_get_default ();
+ girdir = g_build_filename (g_getenv ("top_builddir"), "gir", NULL);
+ g_irepository_prepend_search_path (girdir);
+ g_free (girdir);
+
ret = g_irepository_require (repo, "Gio", NULL, 0, &error);
g_assert (ret);
g_assert (error == NULL);
@@ -31,5 +36,7 @@
info = g_irepository_find_by_gtype (repo, g_type_from_name ("GCancellable"));
g_assert (info != NULL);
+ g_print ("Successfully found GCancellable\n");
+
exit(0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]