summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-24 21:17:06 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-25 17:06:00 +0200
commitff4fe9dee230fbfe1dd489be3f721588ec0f83c1 (patch)
tree7673a436291775b2101483b259cea25b4f667c84 /meson.build
parentmkosi: Add squashfs-tools (diff)
downloadsystemd-ff4fe9dee230fbfe1dd489be3f721588ec0f83c1.tar.xz
systemd-ff4fe9dee230fbfe1dd489be3f721588ec0f83c1.zip
meson: Properly check dependencies of mkosi target
Let's insist on mkosi being found if the integration-tests option is enabled and let's only add dependencies on systemd-journal-remote and systemd-measure if they're being built. Drop ukify from the list as its part of public_programs.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build21
1 files changed, 15 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index ad9ecba74f..580f4312f9 100644
--- a/meson.build
+++ b/meson.build
@@ -321,6 +321,7 @@ meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
slow_tests = want_tests != 'false' and get_option('slow-tests')
fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
+integration_tests = want_tests != 'false' and get_option('integration-tests')
install_tests = want_tests != 'false' and get_option('install-tests')
if add_languages('cpp', native : false, required : fuzzer_build)
@@ -2574,6 +2575,18 @@ endif
#####################################################################
mkosi = find_program('mkosi', required : false)
+if integration_tests and not mkosi.found()
+ error('Could not find mkosi which is required to run the integration tests')
+endif
+
+mkosi_depends = public_programs
+
+foreach executable : ['systemd-journal-remote', 'systemd-measure']
+ if executable in executables_by_name
+ mkosi_depends += [executables_by_name[executable]]
+ endif
+endforeach
+
if mkosi.found()
custom_target('mkosi',
build_always_stale : true,
@@ -2588,13 +2601,9 @@ if mkosi.found()
'--build-dir', meson.current_build_dir() / 'mkosi.builddir',
'--force',
'--debug',
- 'build'
- ],
- depends : public_programs + [
- executables_by_name['systemd-journal-remote'],
- executables_by_name['systemd-measure'],
- ukify,
+ 'build',
],
+ depends : mkosi_depends,
)
endif