From 1fb8cbb15aa315afc8f179f0c6d2994af7fadbc3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Mar 2024 15:05:15 +1000 Subject: [PATCH] build: Check for python-dbusmock if the core tests are enabled Part-of: --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 0d9898775..a352bd3d1 100644 --- a/meson.build +++ b/meson.build @@ -63,6 +63,7 @@ gnome = import('gnome') pkg = import('pkgconfig') i18n = import('i18n') fs = import('fs') +python = import('python') cc = meson.get_compiler('c') add_project_link_arguments( @@ -356,6 +357,7 @@ have_installed_tests = false if have_tests 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') if have_core_tests @@ -365,6 +367,9 @@ if have_tests if not have_x11_client error('Tests requires an X11 client') endif + if not dbusmock_dep.found() + error('Tests require python-dbusmock') + endif endif have_native_tests = get_option('native_tests') if have_native_tests