Pierrick Bouvier <[email protected]> writes:

> On MacOS, meson does not find qemu binary. Use full path to fix it.
> Also, add qemu binary as dependency for the test, to ensure it's built
> automatically.
>
> Signed-off-by: Pierrick Bouvier <[email protected]>
> ---
>  tests/tcg/meson.build | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
> index ea17a947628..fe382638297 100644
> --- a/tests/tcg/meson.build
> +++ b/tests/tcg/meson.build
> @@ -323,12 +323,13 @@ foreach target, plan: tcg_tests
>        endif
>  
>        exe = built_tests[exe_name]
> -      cmd = [qemu, qemu_args, exe]
> +      test_depends += qemu
> +      cmd = [qemu.full_path(), qemu_args, exe]
>  
>        if 'gdb_test' in setup
>          cmd = [prog_gdb_test,
>                 '--gdb', gdb,
> -               '--qemu', qemu,
> +               '--qemu', qemu.full_path(),
>                 '--qargs', ' '.join(qemu_args),
>                 '--bin', exe,
>                 setup['gdb_test'],

I think I've mentioned this before but the setting of cmd and then
resetting it reads weirdly. Especially as later we do have cases of
prefacing cmd with more stuff.

Anyway:

Reviewed-by: Alex Bennée <[email protected]>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to