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:
parent
dedfc99a84
commit
1fb8cbb15a
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue