Re: [PATCH v6 02/13] t: import the clar unit testing framework
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 3, 2024, 07:45 UTC
- Message-ID
- <Zta-pKzaJtkedZTO@tanuki>
- In-Reply-To
- <435e3840-ee46-4ca3-a525-747848da9930@gmail.com>
On Wed, Aug 28, 2024 at 02:16:52PM +0100, Phillip Wood wrote:
Show 10 quoted lines
> Hi Patrick > > On 20/08/2024 15:02, Patrick Steinhardt wrote: > > Import the clar unit testing framework at commit 1516124 (Merge pull > > request #97 from pks-t/pks-whitespace-fixes, 2024-08-15). The framework > > will be wired up in subsequent commits. > > I would be good to explain why we're doing this so we have a record in the > project history. A summary of the advantages and disadvantages of using clar > vs our current unit test framework would be helpful as well.
Will do.
Show 13 quoted lines
> > diff --git a/t/unit-tests/clar/clar.c b/t/unit-tests/clar/clar.c
> > [...]
> > +static void
> > +clar_parse_args(int argc, char **argv)
> > +{
> > [...]
> > + case 'q':
> > + _clar.report_errors_only = 1;
> > + break;
>
> I think this option is incompatible with TAP output as when TAP output is
> selected the first error is printed as part of clar_print_ontest() and
> clar_print_errors() is a no-op. We should error out if it is given with '-t'Yup. I'll address this by implementing our own option parsing.
The remainder of your concerns relate to the clar implementation itself, and as such I won't yet address them. I'll work with upstream to get these fixed after this series lands though, as outlined in [1].
[1]: <ZsSTOczuGhT5zwoV@tanuki>
Patrick