summaryrefslogtreecommitdiff
path: root/tests/invoke
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2008-08-20 19:17:14 +0000
committerColin Walters <walters@src.gnome.org>2008-08-20 19:17:14 +0000
commit76c461f297974edb65fee60752de53692fecb0e4 (patch)
treedf1e01ccea9ce61d6120018e1a1ff97e3eac2e02 /tests/invoke
parentac59d7bac781df74236e1b801565d6b13a9e6433 (diff)
downloadgobject-introspection-76c461f297974edb65fee60752de53692fecb0e4.tar.gz
Rename .gir files using GI namespace. Use XDG_DATA_DIRS for looking up
2008-08-20 Colin Walters <walters@verbum.org> * gir/Makefile.am: Rename .gir files using GI namespace. * girepository/girepository.c: Use XDG_DATA_DIRS for looking up typelibs. Also typelibs are now suffixed with .typelib. * tests/invoke/Makefile.am: Only use metadata. * girepository/Makefile.am: Remove unnecessary include. * tests/scanner/Makefile.am: Update using GI namespaces for scanner includes. svn path=/trunk/; revision=422
Diffstat (limited to 'tests/invoke')
-rw-r--r--tests/invoke/Makefile.am8
-rw-r--r--tests/invoke/invoke.c21
2 files changed, 6 insertions, 23 deletions
diff --git a/tests/invoke/Makefile.am b/tests/invoke/Makefile.am
index 653ccc20..f9c87eb6 100644
--- a/tests/invoke/Makefile.am
+++ b/tests/invoke/Makefile.am
@@ -13,15 +13,12 @@ testfns_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
testfns_la_LDFLAGS = -module -avoid-version
testfns_la_LIBADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
-BUILT_SOURCES = testfns-metadata.c test.repo
-CLEANFILES = testfns-metadata.c test.repo
+BUILT_SOURCES = testfns-metadata.c
+CLEANFILES = testfns-metadata.c
testfns-metadata.c: testfns.gir $(top_builddir)/tools/g-ir-compiler
$(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler $(srcdir)/testfns.gir -o testfns-metadata.c
-test.repo: testfns.gir testfns.la
- $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler --shared-library testfns.la $< --raw -o $@
-
invoke_SOURCES = invoke.c
invoke_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
invoke_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
@@ -30,4 +27,3 @@ TESTS = invoke invoke-namespace-find.sh
EXTRA_DIST = invoke-namespace-find.sh testfns.gir
-TESTS_ENVIRONMENT = GIREPOPATH="."
diff --git a/tests/invoke/invoke.c b/tests/invoke/invoke.c
index 01f253e2..7962c104 100644
--- a/tests/invoke/invoke.c
+++ b/tests/invoke/invoke.c
@@ -30,24 +30,11 @@ main (int argc, char *argv[])
testfns,
g_irepository_get_n_infos (rep, "test"));
- if (argc == 1)
+ handle = g_module_open (testfns, 0);
+ if (!handle)
{
- handle = g_module_open (testfns, 0);
- if (!handle)
- {
- g_error ("module open failed: %s\n", g_module_error ());
- return;
- }
- }
- else
- {
- name = g_irepository_register_file (rep, "test", &error);
- if (error)
- {
- g_error ("Unable to load typelib 'test': %s", error->message);
- return;
- }
- g_print ("Loaded %s from test.gmeta\n", name);
+ g_error ("module open failed: %s\n", g_module_error ());
+ return 1;
}
g_print ("after dlopening %s: %d infos in the repository\n",