On 6/10/2026 2:17 AM, Paolo Bonzini wrote: > On 6/9/26 23:47, Pierrick Bouvier wrote: > >> 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. >> - we could now build tests binaries by default with 'all' target. >> - hopefully, better readability to your taste. > > Yes there is absolutely a readability improvement! At most, one could > say that it's not a very high bar. :) > > Having to reinvent cross compilation (cc_has_feat, custom_targets for > compilation) is not great and the only part I'm not super convinced > about; I wonder what it would be like to make TCG tests their own > standalone meson projects. While the Makefiles are awful I do like > being able to do "make -C tests/tcg/x86_64-softmmu", and in that respect > this would be a half step backwards (and a big step forwards in many > other respects, mind). >
Your idea is to have one project per target, and use meson cross compile support for this? `make check-tcg-aarch64-softmu` is supported out of the box with this series, without having to write a single line of Makefile. You can still do what you like: see cover letter usage, to run a suite or a single test. I don't see rewriting the cc_feat part in meson directly as a problem to be honest. Not all architectures needs to check specific feat (only aarch64, arm, i386, ppc64 and s390x). Also, calling: supported = run_command[cc, check_cflags, flags].returncode() == 0 vs cc.get_supported_arguments(flags) is not really much more complex IMHO, and not a huge reinvention. Also, the custom target is hidden inside tcg/tests/meson.build and not exposed to arch files. Even if we had multiple projects, I would stick to not exposing test() and executable() in arch files. > I can help with the integration of the individual test suites into > tests/tcg/Makefile.include. > I would expect this file to disappear completely, and to rely on make check-tcg-arch-* targets at top level instead. Would that work for you? > Paolo > Regards, Pierrick
