[gtk/gir-test: 4/4] Add a gir test




commit b9dc87faba1363e20b8a58474e193684db1d87a8
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 15 22:14:04 2021 -0500

    Add a gir test
    
    This test doesn't test much, but it loads Gtk-4.0.gir
    from python and creates a window, just to see that things
    work.

 testsuite/gtk/meson.build | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index e578611c0b..01cc59afa0 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -268,13 +268,16 @@ foreach test : focus_chain_tests
   )
 endforeach
 
-if get_option('introspection').enabled()
+if build_gir
+  python = find_program ('python')
   env = environment()
-  env.set('LD_LIBRARY_PATH', meson.project_build_root() + '/gtk')
-  env.set('GI_TYPELIB_DIR', meson.project_build_root() + '/gtk')
-  test('testgir',
-        env: env)
-fi
+  env.set('LD_LIBRARY_PATH', join_paths(meson.build_root(), 'gtk'))
+  env.set('GI_TYPELIB_DIR', join_paths(meson.build_root(), 'gtk'))
+  test('testgir', python,
+       args: [ join_paths(meson.current_source_dir(), 'testgir') ],
+       env: env,
+       suite: [ 'gtk', 'gir' ])
+endif
 
 if get_option('install-tests')
   foreach t : tests


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