[PATCH] tests/tcg/meson.build: fix build_test_depends

Pierrick Bouvier posted 1 patch 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260904200614.2808877-1-pierrick.bouvier@oss.qualcomm.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
tests/tcg/meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] tests/tcg/meson.build: fix build_test_depends
Posted by Pierrick Bouvier 3 weeks ago
build_test_depends is supposed to be an array, not a custom target. In
case we go through this path, we have an error with following lines:

      exe_depends = build_test_depends
      if 'depends' in setup
        exe_depends += setup['depends']
      endif

where meson complains that custom target has no += operator.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
---
 tests/tcg/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index 243cdb5fc8c..d41a228fb3d 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -263,8 +263,8 @@ foreach target, plan: tcg_tests
     endif
 
     if not has_cc and has_docker
-      build_test_depends = image_targets[cc_dockerfile]
-      build_test_depend_files = dockerfile
+      build_test_depends += image_targets[cc_dockerfile]
+      build_test_depend_files += dockerfile
       mount = meson.project_source_root()
       mount = mount + ':' + mount
       here = meson.project_build_root()
-- 
2.47.3
Re: [PATCH] tests/tcg/meson.build: fix build_test_depends
Posted by Pierrick Bouvier 3 weeks ago
On 9/4/2026 1:06 PM, Pierrick Bouvier wrote:
> build_test_depends is supposed to be an array, not a custom target. In
> case we go through this path, we have an error with following lines:
> 
>       exe_depends = build_test_depends
>       if 'depends' in setup
>         exe_depends += setup['depends']
>       endif
> 
> where meson complains that custom target has no += operator.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> ---
>  tests/tcg/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
> index 243cdb5fc8c..d41a228fb3d 100644
> --- a/tests/tcg/meson.build
> +++ b/tests/tcg/meson.build
> @@ -263,8 +263,8 @@ foreach target, plan: tcg_tests
>      endif
>  
>      if not has_cc and has_docker
> -      build_test_depends = image_targets[cc_dockerfile]
> -      build_test_depend_files = dockerfile
> +      build_test_depends += image_targets[cc_dockerfile]
> +      build_test_depend_files += dockerfile
>        mount = meson.project_source_root()
>        mount = mount + ':' + mount
>        here = meson.project_build_root()

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Re: [PATCH] tests/tcg/meson.build: fix build_test_depends
Posted by Pierrick Bouvier 3 weeks ago
On 9/4/2026 1:06 PM, Pierrick Bouvier wrote:
> build_test_depends is supposed to be an array, not a custom target. In
> case we go through this path, we have an error with following lines:
> 
>       exe_depends = build_test_depends
>       if 'depends' in setup
>         exe_depends += setup['depends']
>       endif
> 
> where meson complains that custom target has no += operator.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> ---
>  tests/tcg/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
> index 243cdb5fc8c..d41a228fb3d 100644
> --- a/tests/tcg/meson.build
> +++ b/tests/tcg/meson.build
> @@ -263,8 +263,8 @@ foreach target, plan: tcg_tests
>      endif
>  
>      if not has_cc and has_docker
> -      build_test_depends = image_targets[cc_dockerfile]
> -      build_test_depend_files = dockerfile
> +      build_test_depends += image_targets[cc_dockerfile]
> +      build_test_depend_files += dockerfile
>        mount = meson.project_source_root()
>        mount = mount + ':' + mount
>        here = meson.project_build_root()

Alex, I had this fix on my local branch which I forgot to mention.
I'm sending a PR directly to make sure it does not break configure for
anyone (will happen if people don't have cross compilers and have podman
or docker installed).

Thanks for the original PR you sent.

Regards,
Pierrick