Hi,

On 2026-02-17 15:48:50 +0000, Zsolt Parragi wrote:
> Oops, sorry, somehow I missed that thread when I searched for this.
> 
> The main difference seems to be that  I added this as part of the test
> suite and not the build, and I didn't had to modify headerscheck
> itself - at least it works on my test setups without modification.

I'm not sure stuff like this is really well suited to be done via tests.

My personal distinction is that there should be a benefit for tests to be run
over and over, regardless of source code changes, because the tests might fail
only occasionally. Whereas e.g. headerscheck will either fail or succeed,
rerunning it without source code changes should never change the result.

headerscheck also has the habit of failing on some platforms, it'll e.g. not
work on windows when building with msvc and probably won't work when building
with mingw.

I also think that eventually we should do what you alluded to in a comment,
namely make headerscheck an explicit part of the build system, with proper
support for dependencies and parallelism.

Until then I'd just make it a target that needs to be run explicitly.


I guess a next step after that could be for headerscheck to grow the ability
to output dependencies. Once you have that, having run headerscheck could
create a stamp file. Then the headerscheck target would only need to do work
if either the stamp file is not present (i.e. the first run) or if one of the
tested headers changes.

Greetings,

Andres Freund


Reply via email to