* [PATCH] meson: build all modules by default
@ 2022-01-07 12:01 Paolo Bonzini
2022-01-07 17:05 ` Li Zhang
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2022-01-07 12:01 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth
With more recent versions of Meson, the build.ninja file is more selective
as to what is built by default, and not building the modules results in test
failures.
Mark the modules as built-by-default and, to make the dependencies more
precise, also require them to be up-to-date before running tests.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/801
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 4 +++-
tests/qtest/meson.build | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 6489ff8425..703eefea13 100644
--- a/meson.build
+++ b/meson.build
@@ -2866,8 +2866,10 @@ common_ss.add(hwcore)
# Targets #
###########
+emulator_modules = []
foreach m : block_mods + softmmu_mods
- shared_module(m.name(),
+ emulator_modules += shared_module(m.name(),
+ build_by_default: true,
name_prefix: '',
link_whole: m,
install: true,
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 37e1eaa449..26937deb6d 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -335,10 +335,9 @@ foreach dir : target_dirs
test: executable(test, src, dependencies: deps)
}
endif
- # FIXME: missing dependency on the emulator binary and qemu-img
test('qtest-@0@/@1@'.format(target_base, test),
qtest_executables[test],
- depends: [test_deps, qtest_emulator],
+ depends: [test_deps, qtest_emulator, emulator_modules],
env: qtest_env,
args: ['--tap', '-k'],
protocol: 'tap',
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] meson: build all modules by default
2022-01-07 12:01 [PATCH] meson: build all modules by default Paolo Bonzini
@ 2022-01-07 17:05 ` Li Zhang
0 siblings, 0 replies; 2+ messages in thread
From: Li Zhang @ 2022-01-07 17:05 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: thuth
On 1/7/22 1:01 PM, Paolo Bonzini wrote:
> With more recent versions of Meson, the build.ninja file is more selective
> as to what is built by default, and not building the modules results in test
> failures.
>
> Mark the modules as built-by-default and, to make the dependencies more
> precise, also require them to be up-to-date before running tests.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/801
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> meson.build | 4 +++-
> tests/qtest/meson.build | 3 +--
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 6489ff8425..703eefea13 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2866,8 +2866,10 @@ common_ss.add(hwcore)
> # Targets #
> ###########
>
> +emulator_modules = []
> foreach m : block_mods + softmmu_mods
> - shared_module(m.name(),
> + emulator_modules += shared_module(m.name(),
> + build_by_default: true,
> name_prefix: '',
> link_whole: m,
> install: true,
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index 37e1eaa449..26937deb6d 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -335,10 +335,9 @@ foreach dir : target_dirs
> test: executable(test, src, dependencies: deps)
> }
> endif
> - # FIXME: missing dependency on the emulator binary and qemu-img
> test('qtest-@0@/@1@'.format(target_base, test),
> qtest_executables[test],
> - depends: [test_deps, qtest_emulator],
> + depends: [test_deps, qtest_emulator, emulator_modules],
> env: qtest_env,
> args: ['--tap', '-k'],
> protocol: 'tap',
>
Thanks. The issue is fixed.
Tested-by: Li Zhang <lizhang@suse.de>
Thanks
Li
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-07 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 12:01 [PATCH] meson: build all modules by default Paolo Bonzini
2022-01-07 17:05 ` Li Zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.