1
0
Fork 0

build: Check for python-dbusmock if the core tests are enabled

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3648>
This commit is contained in:
Peter Hutterer 2024-03-07 15:05:15 +10:00 committed by Marge Bot
parent dedfc99a84
commit 1fb8cbb15a

View file

@ -63,6 +63,7 @@ gnome = import('gnome')
pkg = import('pkgconfig') pkg = import('pkgconfig')
i18n = import('i18n') i18n = import('i18n')
fs = import('fs') fs = import('fs')
python = import('python')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
add_project_link_arguments( add_project_link_arguments(
@ -356,6 +357,7 @@ have_installed_tests = false
if have_tests if have_tests
gtk3_dep = dependency('gtk+-3.0', version: gtk3_req) gtk3_dep = dependency('gtk+-3.0', version: gtk3_req)
dbusmock_dep = python.find_installation('python3', modules: ['dbusmock'], required: false)
have_core_tests = get_option('core_tests') have_core_tests = get_option('core_tests')
if have_core_tests if have_core_tests
@ -365,6 +367,9 @@ if have_tests
if not have_x11_client if not have_x11_client
error('Tests requires an X11 client') error('Tests requires an X11 client')
endif endif
if not dbusmock_dep.found()
error('Tests require python-dbusmock')
endif
endif endif
have_native_tests = get_option('native_tests') have_native_tests = get_option('native_tests')
if have_native_tests if have_native_tests