Re: [RFC PATCH v3 00/15] Modernize the build system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/24 12:08 PM, Ramsay Jones wrote:
> I had a very quick attempt on cygwin the other night, and it behaved
> differently at the 'ninja test' stage. It printed something like
> '[0/1] all tests' and then seemed to do nothing, except 'python3.9'
> was hovering up all cycles (well over 75% anyway) with no indication
> of any progress. This was nothing like the behaviour on Linux (which
> also looked a bit strange, but at least showed progress on each test
> as it ran).
> 
> I ^C-ed it, since I didn't want to wait 6 hours before it (hopefully)
> finished running.


Running "ninja test" can be thought of as a convenience target to make
all commands available via the Makefile equivalent. What it actually
does, though, is first depend on "all" + any explicit test dependencies,
and then dispatch to the separate "meson test" tool with some tastefully
chosen arguments such as "--no-rebuild" (to prevent rerunning ninja) as
well as --print-errorlogs.

Running "meson test" directly is still possible, and maybe required if
you want to do things such as --interactive, or running a specific
testcase rather than all of them, or --maxfail, or well, all kinds of
fiddly and specific fine-tuning. :)

But in particular, I am wondering if maybe your cygwin issue is somehow
due to ninja deciding that it really really wanted to buffer all output
and wait until it completes before showing anything. It's not supposed
to do that, since we wire it up to the "console" pool:
https://ninja-build.org/manual.html#_the_literal_console_literal_pool

The other possibility is that the python installation has decided to
buffer itself:
https://docs.python.org/3/using/cmdline.html#cmdoption-u

possibly because due to ninja's juggling of pseudo ttys, the python
runtime for "meson test" thinks it is *not* running in a tty. I know
that ninja messes around with this in counterintuitive ways in general,
but I am not sure exactly how that interacts with the console pool. But
regardless of the reason -- if it is happening at the python level, then
exporting PYTHONUNBUFFERED=1 may help. It's something I've had to do
before for programs other than meson, at least.


-- 
Eli Schwartz

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux