From e2f9f3409a4be9821d042bd6f4a157044a12b38b Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 27 May 2024 11:15:02 +0200 Subject: [PATCH] meson: Look up mkosi once --- meson.build | 2 +- test/integration-test-wrapper.py | 5 +++-- test/meson.build | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index dfea903b60e..e071d58e11f 100644 --- a/meson.build +++ b/meson.build @@ -2626,7 +2626,7 @@ if mkosi.found() console : true, output : '.', command : [ - 'mkosi', + mkosi, '--directory', meson.current_source_dir(), '--output-dir', meson.current_build_dir() / 'mkosi.output', '--cache-dir', meson.current_build_dir() / 'mkosi.cache', diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py index 55a45307e27..c84296d8164 100755 --- a/test/integration-test-wrapper.py +++ b/test/integration-test-wrapper.py @@ -40,6 +40,7 @@ ExecStart=false def main(): parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--mkosi', required=True) parser.add_argument('--meson-source-dir', required=True, type=Path) parser.add_argument('--meson-build-dir', required=True, type=Path) parser.add_argument('--name', required=True) @@ -102,7 +103,7 @@ def main(): journal_file = None cmd = [ - 'mkosi', + args.mkosi, '--directory', os.fspath(args.meson_source_dir), '--output-dir', os.fspath(args.meson_build_dir / 'mkosi.output'), '--extra-search-path', os.fspath(args.meson_build_dir), @@ -165,7 +166,7 @@ def main(): j = json.loads( subprocess.run( [ - "mkosi", + args.mkosi, "--directory", os.fspath(args.meson_source_dir), "--json", "summary", diff --git a/test/meson.build b/test/meson.build index bb91ec8875f..5c15ade344c 100644 --- a/test/meson.build +++ b/test/meson.build @@ -407,7 +407,11 @@ foreach integration_test : integration_tests integration_test_args += ['--slow'] endif - integration_test_args += ['--'] + if not mkosi.found() + continue + endif + + integration_test_args += ['--mkosi', mkosi.full_path(), '--'] if integration_test['cmdline'].length() > 0 integration_test_args += [