[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `make check -j` fails when building GNU Make from source
From: |
Alejandro Colomar |
Subject: |
Re: `make check -j` fails when building GNU Make from source |
Date: |
Mon, 3 Apr 2023 14:36:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 |
Hi Paul,
On 4/3/23 14:26, Paul Smith wrote:
> On Sun, 2023-04-02 at 18:14 +0200, Alejandro Colomar wrote:
>> I wonder if you could use the Makefile to run the tests, rather
>> than calling a script from a .PHONY target that runs them all the
>> time. Why not run them only once? You can touch empty files
>> when a test succeeds to make make(1) happy (I usually call them
>> *.touch files).
>
> I don't quite understand what you mean by "why not run them only once".
> They are run only once...?
>
> Maybe you mean, if (a) the make binary hasn't been rebuilt and (b) the
> test script hasn't been changed, then we wouldn't need to re-run the
> test?
Yes, I meant that.
> Perhaps, but realistically I'm not sure it's worth the effort to
> make this change because almost the only time we ever run these tests
> is when we've rebuilt the make binary, and it's easy enough to run just
> a single test if we want to.
A few beneifts:
- Being part of the make targets, it would enable running them in
parallel, taking around 1/4th the time it takes now.
- If you run them several times, you only get rerun the ones that
failed (especially if you run with -k) or didn't yet run. This
allows interrupting the job and restarting (as I did).
But of course, I'm not going to tell you all of the benefits that a
Makefile has over a shell script. :)
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
OpenPGP_signature
Description: OpenPGP digital signature