Thread (2 messages) 2 messages, 2 authors, 2024-09-10

Re: [PATCH v8 10/14] Makefile: wire up the clar unit testing framework

From: Patrick Steinhardt <hidden>
Date: 2024-09-10 06:20:42

On Mon, Sep 09, 2024 at 11:17:43AM -0700, Junio C Hamano wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
+UNIT_TESTS_PROG = $(UNIT_TEST_BIN)/unit-tests$(X)
+UNIT_TESTS_OBJS = $(patsubst %,$(UNIT_TEST_DIR)/%.o,$(UNIT_TESTS_SUITES))
+UNIT_TESTS_OBJS += $(UNIT_TEST_DIR)/clar/clar.o
+UNIT_TESTS_OBJS += $(UNIT_TEST_DIR)/unit-test.o
+
 UNIT_TEST_PROGRAMS += t-ctype
 UNIT_TEST_PROGRAMS += t-example-decorate
 UNIT_TEST_PROGRAMS += t-hash
@@ -2714,6 +2721,7 @@ OBJECTS += $(XDIFF_OBJS)
 OBJECTS += $(FUZZ_OBJS)
 OBJECTS += $(REFTABLE_OBJS) $(REFTABLE_TEST_OBJS)
 OBJECTS += $(UNIT_TEST_OBJS)
+OBJECTS += $(UNIT_TESTS_OBJS)
What is the longer term direction we envision?  Do we aim to retire
the UNIT_TEST_* and end up with only the clar based tests?
Yeah, that's my plan. I first want to let the new clar-based tests cook
a bit to shake out any issues with it, and address issues with clar that
were raised during review upstream. But once that's done and we see that
it works alright for our purpose I'd aim to convert all test suites to
use the clar such that we ultimately end up with a single unit testing
framework, only.
At least until that happens, can we have "UNIT_TESTS" -> "CLAR_TEST"
or something that makes it less confusing?  Every time I see merge
conflicts around this area in the Makefile, I get puzzled and wonder
which one is which.
These are indeed quite similarly named, so I see where the confusion
comes from. I'll send a patch in a bit to rename them.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help