Re: [PATCH v4 0/7] Introduce clar testing framework
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 15, 2024, 16:21 UTC
- Message-ID
- <xmqqy14xu58v.fsf@gitster.g>
- In-Reply-To
- <cover.1723712012.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 15 quoted lines
> 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.
Show 8 quoted lines
> +@@ 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.