Subject: Re: [PATCH v4 0/7] Introduce clar testing framework

From: Junio C Hamano <[email-masked]>
Date: Thu, 15 Aug 2024 09:21:04 -0700

Patrick Steinhardt <[email-masked]> writes:

> Hi,
>
> this is the fourth version of my patch series that introduces the clar
> testing framework for our unit tests.
>
> Changes compared to v3:
>
>   - Seeing that the overall feedback seems to be rather positive, I've
>     now dropped the "RFC" prefix.
>
>   - Fix another whitespace-damaged line in the clar unit test. I've
>     adapted the upstream pull request accordingly.
>
>   - Fix `make hdr-check`, which failed due to the missing dependency on
>     "clar-decls.h".

Similarly, lack of clar.suite still makes "make sparse" fail, it
seems.

$ make NO_REGEX=NoThanks -j32 sparse
    ...
    SP builtin/help.c
    CC t/unit-tests/ctype.o
    CC t/unit-tests/strvec.o
    CC t/unit-tests/clar/clar.o
    CC t/unit-tests/unit-test.o
t/unit-tests/clar/clar.c:209:10: fatal error: clar.suite: No such file or directory
  209 | #include "clar.suite"
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:2762: t/unit-tests/clar/clar.o] Error 1
make: *** Waiting for unfinished jobs....

The NO_REGEX is there to force us to go check the compat/regex.h as well.

>     +@@ Makefile: CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(LIB_H))
>     + HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
>     + HCC = $(HCO:hco=hcc)
>     + 
>     ++$(UNIT_TEST_DIR)/unit-test.hcc: $(UNIT_TEST_DIR)/unit-test.h $(UNIT_TEST_DIR)/clar-decls.h
>     + %.hcc: %.h
>     + 	@echo '#include "git-compat-util.h"' >$@
>     + 	@echo '#include "$<"' >>$@

This is a nice addition.

Thanks.