On Fri, Oct 18, 2024 at 02:23:47PM +0200, Patrick Steinhardt wrote: > This series is based on 15030f9556 (The second batch, 2024-10-15) and > has the following dependencies: > > - ps/cmake-clar at c6d3e52c91 (cmake: set up proper > dependencies for generated clar headers, 2024-10-15). > > - ps/upgrade-clar at f3501edb0e (Makefile: adjust sed command for > generating "clar-decls.h", 2024-10-14). > > - ps/platform-compat-fixes at 80ebd91b83 (http: fix build error on > FreeBSD, 2024-10-16). While this is still sitting on my review queue, I rebuilt this topic based on the above (extremely helpful) information, but it seems to produce some conflicts when I try to merge it in at the end of 'seen': --- 8< --- diff --cc Makefile index 2c1afd08cb,a93aeb3bc8..0000000000 --- a/Makefile +++ b/Makefile @@@ -3932,10 -3859,9 +3886,18 @@@ GIT-TEST-SUITES: FORC fi $(UNIT_TEST_DIR)/clar-decls.h: $(patsubst %,$(UNIT_TEST_DIR)/%.c,$(CLAR_TEST_SUITES)) GIT-TEST-SUITES ++<<<<<<< HEAD + $(QUIET_GEN)$(SHELL_PATH) $(UNIT_TEST_DIR)/generate-clar-decls.sh "$@" $(filter %.c,$^) ++||||||| merged common ancestors ++ $(QUIET_GEN)for suite in $(CLAR_TEST_SUITES); do \ ++ sed -ne "s/^\(void test_$${suite}__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)$$\)/extern \1;/p" $(UNIT_TEST_DIR)/$$suite.c; \ ++ done >$@ ++======= + $(QUIET_GEN)$(SHELL_PATH) $(UNIT_TEST_DIR)/generate-clar-decls.sh "$@" $(patsubst %,$(UNIT_TEST_DIR)/%.c,$(CLAR_TEST_SUITES)) ++>>>>>>> ps/build $(UNIT_TEST_DIR)/clar.suite: $(UNIT_TEST_DIR)/clar-decls.h $(QUIET_GEN)awk -f $(UNIT_TEST_DIR)/clar-generate.awk $< >$(UNIT_TEST_DIR)/clar.suite +$(UNIT_TEST_DIR)/clar/clar.o: $(UNIT_TEST_DIR)/clar.suite $(CLAR_TEST_OBJS): $(UNIT_TEST_DIR)/clar-decls.h $(CLAR_TEST_OBJS): EXTRA_CPPFLAGS = -I$(UNIT_TEST_DIR) $(CLAR_TEST_PROG): $(UNIT_TEST_DIR)/clar.suite $(CLAR_TEST_OBJS) $(GITLIBS) GIT-LDFLAGS diff --cc t/unit-tests/clar/clar.c index d54e455367,64879cf2bd..0000000000 --- a/t/unit-tests/clar/clar.c +++ b/t/unit-tests/clar/clar.c @@@ -812,9 -801,8 +812,17 @@@ void clar__assert_equal } } } ++<<<<<<< HEAD +#endif /* CLAR_HAVE_WCHAR */ else if (!strcmp("%"PRIuMAX, fmt) || !strcmp("%"PRIxMAX, fmt)) { uintmax_t sz1 = va_arg(args, uintmax_t), sz2 = va_arg(args, uintmax_t); ++||||||| merged common ancestors ++ else if (!strcmp("%"PRIuZ, fmt) || !strcmp("%"PRIxZ, fmt)) { ++ size_t sz1 = va_arg(args, size_t), sz2 = va_arg(args, size_t); ++======= ++ else if (!strcmp("%"PRIuMAX, fmt) || !strcmp("%"PRIxMAX, fmt)) { ++ uintmax_t sz1 = va_arg(args, uintmax_t), sz2 = va_arg(args, uintmax_t); ++>>>>>>> ps/build is_equal = (sz1 == sz2); if (!is_equal) { int offset = p_snprintf(buf, sizeof(buf), fmt, sz1); diff --cc t/unit-tests/generate-clar-decls.sh index 688e0885f4,81da732917..0000000000 --- a/t/unit-tests/generate-clar-decls.sh +++ b/t/unit-tests/generate-clar-decls.sh @@@ -1,16 -1,16 +1,36 @@@ ++<<<<<<< HEAD +#!/bin/sh + +if test $# -lt 2 +then + echo "USAGE: $0 <OUTPUT> <SUITE>..." 2>&1 + exit 1 +fi + +OUTPUT="$1" +shift + +for suite in "$@" +do + sed -ne "s/^\(void test_$(basename "${suite%.c}")__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)\)$/extern \1;/p" "$suite" || + exit 1 +done >"$OUTPUT" ++||||||| merged common ancestors ++======= + #!/bin/sh + + if test $# -lt 2 + then + echo "USAGE: $0 <OUTPUT> <SUITE>..." 2>&1 + exit 1 + fi + + OUTPUT="$1" + shift + + for suite in "$@" + do + sed -ne "s/^\(void test_$suite__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)$\)/extern \1;/p" "$suite" || + exit 1 + done >"$OUTPUT" ++>>>>>>> ps/build --- >8 --- Thanks, Taylor