diff options
author | Colin Walters <walters@verbum.org> | 2010-11-16 09:46:00 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-11-16 09:46:00 -0500 |
commit | e4b6098e55307f602c179f37d59fbc6d0d965267 (patch) | |
tree | e118faf6eeb94068ba8f8cb558f081a344512ebc | |
parent | e59214ec184423e0a468e7b01be4a38acacf2b31 (diff) | |
download | gobject-introspection-e4b6098e55307f602c179f37d59fbc6d0d965267.tar.gz |
Fix tests to look in correct directory for typelibs
With nonrecursive they're in $(top_builddir) now
-rw-r--r-- | tests/offsets/Makefile.am | 2 | ||||
-rw-r--r-- | tests/repository/Makefile.am | 2 | ||||
-rw-r--r-- | tests/repository/gitestrepo.c | 5 | ||||
-rw-r--r-- | tests/repository/gitestthrows.c | 5 | ||||
-rw-r--r-- | tests/warn/warningtester.py | 4 |
5 files changed, 4 insertions, 14 deletions
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am index 60d37b39..4f03830e 100644 --- a/tests/offsets/Makefile.am +++ b/tests/offsets/Makefile.am @@ -48,7 +48,7 @@ CLEANFILES += gitestoffsets.c ############################################################ check-local: Offsets-1.0.typelib - GI_TYPELIB_PATH=:$(top_builddir)/gir ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected + GI_TYPELIB_PATH=:$(top_builddir) ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected diff -u offsets.compiled offsets.introspected CLEANFILES += offsets.compiled offsets.introspected diff --git a/tests/repository/Makefile.am b/tests/repository/Makefile.am index b7ed21c0..a4557a9c 100644 --- a/tests/repository/Makefile.am +++ b/tests/repository/Makefile.am @@ -13,5 +13,5 @@ gitestthrows_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository gitestthrows_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS) TESTS = gitestrepo gitestthrows -TESTS_ENVIRONMENT=env top_builddir="$(top_builddir)" \ +TESTS_ENVIRONMENT=env GI_TYPELIB_PATH=$(top_builddir) \ XDG_DATA_DIRS="$(top_srcdir)/gir:$(XDG_DATA_DIRS)" $(DEBUG) diff --git a/tests/repository/gitestrepo.c b/tests/repository/gitestrepo.c index eba655fa..316ee3d2 100644 --- a/tests/repository/gitestrepo.c +++ b/tests/repository/gitestrepo.c @@ -43,16 +43,11 @@ main(int argc, char **argv) GIBaseInfo *info; GIBaseInfo *siginfo; 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); if (!ret) g_error ("%s", error->message); diff --git a/tests/repository/gitestthrows.c b/tests/repository/gitestthrows.c index d29eceb4..cce06849 100644 --- a/tests/repository/gitestthrows.c +++ b/tests/repository/gitestthrows.c @@ -11,7 +11,6 @@ main(int argc, char **argv) GIRepository *repo; GITypelib *ret; GIBaseInfo *info; - char *girdir; GIArgument in_arg[1]; GIArgument ret_arg; GError *error; @@ -21,10 +20,6 @@ main(int argc, char **argv) repo = g_irepository_get_default (); - girdir = g_build_filename (g_getenv ("top_builddir"), "gir", NULL); - g_irepository_prepend_search_path (girdir); - g_free (girdir); - error = NULL; ret = g_irepository_require (repo, "GLib", NULL, 0, &error); g_assert (ret != NULL); diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py index f8f55655..bd1a4ad3 100644 --- a/tests/warn/warningtester.py +++ b/tests/warn/warningtester.py @@ -20,8 +20,8 @@ from giscanner.scannermain import process_packages currentdir = os.path.dirname(os.path.abspath(sys.argv[0])) current_name = os.path.basename(currentdir) path = os.path.abspath(os.path.join(currentdir, '..', '')) +top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR'] top_builddir = os.environ['TOP_BUILDDIR'] -girpath = os.path.join(top_builddir, 'gir') class Options: def __init__(self): @@ -76,7 +76,7 @@ def check(args): output=output) logger.enable_warnings(True) transformer = Transformer(namespace) - transformer.set_include_paths([girpath]) + transformer.set_include_paths([os.path.join(top_srcdir, 'gir'), top_builddir]) transformer.register_include(Include.from_string("GObject-2.0")) ss = SourceScanner() |