Pierrick Bouvier <[email protected]> writes:

> On 7/14/2026 2:53 AM, Alex Bennée wrote:
>> Pierrick Bouvier <[email protected]> writes:
>> 
>>> This series replaces TCG tests makefiles with meson, with the
>>> goal of having something more readable and maintainable in the long term.
>>> Also it closes the gap that tcg tests had with the rest of tests, by 
>>> integrating
>>> them with meson directly.
>>>
>>> It covers all existing tests for all architectures, including
>>> user/system/multiarch-user/multiarch-system. It implements all requirements
>>> listed on original thread [1].
>>>
>>> [1] https://lore.kernel.org/qemu-devel/[email protected]/
>>>
>>> We also have for free:
>>> - correct and complete dependencies for any test, including:
>>>   scripts, c.inc, headers, reference files and binaries/plugins.
>>> - catch test declaration issues at configure time vs test time.
>>> - proper data types for variables instead of string expansion with make.
>>>
>>> Series first introduce the meson machinery needed in tests/tcg/meson.build, 
>>> step
>>> by step. Then it adds support for all existing archs. Finally, we remove
>>> Makefiles and configure bits, and add documentation.
>>>
>>> Usage:
>>>
>>> ```
>>> make check-tcg
>>> make check-tcg-aarch64-linux-user
>>> make check-tcg-aarch64-softmmu
>>> make tcg-tests
>>>
>>> ninja tcg-tests
>> 
>> This does work but I couldn't see tcg-tests (or individual tests) when
>> running:
>> 
>>   ninja -C . -t query all
>> 
>> (which is what my Emacs's helper uses to query potential targets from
>> ninja).
>> 
>> The plugins, unit and qtest tests all appear in the list.
>>
>
> This is because tcg tests are not built by default (so not included in
> all), but they are under target tcg-tests.
> Good news is that updating emacs config won't be too hard:
> ninja -C build/ . -t query all tcg-tests

Thanks.

The helper is intending to be a generic introspection helper for
multiple projects. Do you know if its possible to query for the list of
groups(?) with ninja?

I guess something like:

  ninja -t targets | grep phony

would work but I wonder if there is a better way?

>
> I enabled default build in v2, but removed it in v3 since it was really
> weird to build half of the tests (with native cc available), and leave
> the rest (based on containers) out of it. Now seeing your emacs
> configuration, I'm even more convinced it would be very confusing to
> only show part of them by default.
>
> There is no way to make all tcg-tests appear in all target, since it
> would imply we trigger container builds by default, which is a very
> counterintuitive default IMHO.
> Regards,
> Pierrick

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to