[gobject-introspection] tests: Look for uninstalled .girs



commit 0258ba437d4cd55c7564d0efc07d68f96297b829
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 22 12:48:33 2010 -0400

    tests: Look for uninstalled .girs
    
    Add $(top_builddir)/gir to the include path, like we do in
    Makefile.introspection.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630160

 tests/warn/Makefile.am      |    2 +-
 tests/warn/warningtester.py |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tests/warn/Makefile.am b/tests/warn/Makefile.am
index 921ec59..81c7442 100644
--- a/tests/warn/Makefile.am
+++ b/tests/warn/Makefile.am
@@ -10,5 +10,5 @@ TESTS = \
 
 EXTRA_DIST = warningtester.py common.h $(TESTS)
 
-TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) $(PYTHON) $(srcdir)/warningtester.py
+TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) $(PYTHON) $(srcdir)/warningtester.py
 
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py
index 909a07a..2948c74 100644
--- a/tests/warn/warningtester.py
+++ b/tests/warn/warningtester.py
@@ -16,6 +16,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_builddir = os.environ['TOP_BUILDDIR']
+girpath = os.path.join(top_builddir, 'gir')
 
 class Options:
     def __init__(self):
@@ -70,6 +72,7 @@ def check(args):
                                output=output)
     logger.enable_warnings(True)
     transformer = Transformer(namespace)
+    transformer.set_include_paths([girpath])
     transformer.register_include(Include.from_string("GObject-2.0"))
 
     ss = SourceScanner()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]