On 5/25/2026 11:43 AM, Alex Bennée wrote: > Pierrick Bouvier <[email protected]> writes: > >> On 5/25/2026 8:46 AM, Pierrick Bouvier wrote: >>> On 5/23/2026 1:56 AM, Alex Bennée wrote: >>>> Pierrick Bouvier <[email protected]> writes: >>>> >>>>> On 5/22/2026 12:02 PM, Alex Bennée wrote: >>>>>> Pierrick Bouvier <[email protected]> writes: >>>>>> >>>>>>> On 5/21/2026 6:17 AM, Alex Bennée wrote: >>>>>>>> Explicitly set the appropriate QEMU binary as a dependency so we can >>>>>>>> ensure they get built. This is especially important for MacOS which >>>>>>>> otherwise only builds the unsigned binaries on a normal "make all" >>>>>>>> run. >>>>>>>> >>>>>>> >>>>>>> I'm not sure to see why it matters. tcg-tests don't make use of hvf, so >>>>>>> unsigned binaries are plenty for it. >>>>>>> >>>>>>> Which other binary is this building that is not built by default? >>>>>>> >>>>>>> In general, if something is not included in "all" target, let's make >>>>>>> sure it's included there (meson.build?) instead of adding a workaround >>>>>>> here. Not only tests benefit this, but anyone doing a build on a >>>>>>> platform that might have optional binaries not built by default. >>>>>> >>>>>> If you have a suggestion on how to make that work I'm all ears. >>>>>> >>>>> >>>>> I would be happy to help, but I don't understand what the goal is. I >>>>> have three questions that should help to provide a suggestion. >>>>> >>>>> Which exact test command do you run? >>>> >>>> make check-tcg >>>> >>>>> >>>>> ``` >>>>> Explicitly set the appropriate QEMU binary as a dependency so we can >>>>> ensure they get built. >>>>> ``` >>>>> Aren't they built by all? >>>> >>>> Apparently not. >>>> >>>>> It seems to be a dependency, at least for check-tcg: >>>>> .ninja-goals.check-tcg = all test-plugins >>>>> >>>>> ``` >>>>> This is especially important for MacOS which otherwise only builds the >>>>> unsigned binaries on a normal "make all" run. >>>>> ``` >>>>> Why do you need signed binaries for testing on MacOS (hvf?)? >>>> >>>> In a previous iteration I made configure spit out the unsigned binaries >>>> to config-target.mak but the request was to fix the dependencies >>>> instead. >>>> >>>> It all works on Linux so I'm not sure why MacOS is being so weird >>>> because the meson emulators target mechanism should be the same. >>>> >>> >>> Just tried now, and it does not work on Linux neither (make check-tcg >>> does not build any target beyond tests). Maybe you forgot to clean your >>> folder? >>> >> >> The root issue is that tests/Makefile.include is included *after* >> evaluation of ninja-targets in main Makefile. Thus, >> .ninja-goals.check-tcg is ignored. > > So this replaces patch 1/16 - I think we have a circular dependency here. >
Indeed, I didn't notice the duplication. While it solves things under Linux, it doesn't trigger any build on MacOS, which is what you observed also. I wonder if it's a gmake vs whatever-make difference. Another solution that seems ok on both platforms is to use (harmful) recursive make: .PHONY: check-tcg -.ninja-goals.check-tcg = all test-plugins -check-tcg: $(RUN_TCG_TARGET_RULES) +check-tcg: + $(MAKE) all test-plugins + $(MAKE) $(RUN_TCG_TARGET_RULES) .PHONY: clean-tcg clean-tcg: $(CLEAN_TCG_TARGET_RULES) Or maybe just leave it as it is? Doc already mentions build should be done before running any test to avoid missing binaries. Hopefully we'll completely move tcg tests to meson one day, so there is no need to deal with make idiosyncrasy anymore. >> >> The fix is to move ninja-targets evaluation to the end of main Makefile, >> which introduce the expected dependency for check-tcg to "all >> test-plugins" targets. >> >> You can replace current patch with the one attached to this email. >> >> Regards, >> Pierrick >
