tests: Maybe skip introspection tests

If we don't find the python gi module,
skip the introspection test.
This commit is contained in:
Matthias Clasen 2022-12-19 21:18:16 -05:00
parent d758754f20
commit 596f59f471
2 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,10 @@ if hasattr(os, 'add_dll_directory'):
if path != '' and os.path.isdir(path):
os.add_dll_directory(path)
import gi
try:
import gi
except ImportError:
sys.exit(77) # skip this test, gi module is not available
gi.require_version('Gtk', '4.0')

View File

@ -1,5 +1,3 @@
py = import('python').find_installation('python3', modules: ['gi'])
env = environment()
env.prepend('GI_TYPELIB_PATH',
project_build_root / 'gtk',