git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seyi Kufoiji <kuforiji98@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im, phillip.wood@dunelm.org.uk,
	Seyi Kufoiji <ibed@apolop2p.com>,
	Seyi Kuforiji <kuforiji98@gmail.com>
Subject: [PATCH v5 0/5] t/unit-tests: convert unit-tests to use clar
Date: Thu, 24 Jul 2025 14:28:08 +0100	[thread overview]
Message-ID: <20250724132813.59627-1-kuforiji98@gmail.com> (raw)
In-Reply-To: <20250605140644.239199-1-kuforiji98@gmail.com>

From: Seyi Kufoiji <ibed@apolop2p.com>

Hello,

This patch series marks the final batch of our existing unit test files
transitioned to the Clar testing framework. It covers all the
reftable-related test files, and is part of our ongoing effort to
standardize our testing framework to enhance its maintainability.

Changes in v5:
 - some code refactoring and cleanup based on review.

Thanks
Seyi

Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>

Seyi Kuforiji (5):
  t/unit-tests: convert reftable table test to use clar
  t/unit-tests: convert reftable readwrite test to use clar
  t/unit-tests: convert reftable record test to use clar
  t/unit-tests: convert reftable stack test to use clar
  t/unit-tests: finalize migration of reftable-related tests

 Makefile                                      |  13 +-
 t/Makefile                                    |   1 -
 t/meson.build                                 |  34 +-
 t/unit-tests/lib-reftable-clar.c              | 101 ---
 t/unit-tests/lib-reftable-clar.h              |  20 -
 t/unit-tests/lib-reftable.c                   |  35 +-
 t/unit-tests/lib-reftable.h                   |  15 +-
 t/unit-tests/u-reftable-basics.c              |   2 +-
 t/unit-tests/u-reftable-block.c               |   2 +-
 t/unit-tests/u-reftable-merged.c              |   2 +-
 t/unit-tests/u-reftable-pq.c                  |   2 +-
 ...ble-readwrite.c => u-reftable-readwrite.c} | 403 ++++-----
 ...-reftable-record.c => u-reftable-record.c} | 250 +++---
 ...{t-reftable-stack.c => u-reftable-stack.c} | 780 ++++++++----------
 ...{t-reftable-table.c => u-reftable-table.c} |  73 +-
 15 files changed, 711 insertions(+), 1022 deletions(-)
 delete mode 100644 t/unit-tests/lib-reftable-clar.c
 delete mode 100644 t/unit-tests/lib-reftable-clar.h
 rename t/unit-tests/{t-reftable-readwrite.c => u-reftable-readwrite.c} (68%)
 rename t/unit-tests/{t-reftable-record.c => u-reftable-record.c} (62%)
 rename t/unit-tests/{t-reftable-stack.c => u-reftable-stack.c} (59%)
 rename t/unit-tests/{t-reftable-table.c => u-reftable-table.c} (75%)

Range-diff against v4:
1:  cf8b0471fd ! 1:  7c159bd2fe t/unit-tests: convert reftable table test to use clar
    @@ Makefile: CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable-clar.o
      UNIT_TEST_PROGS = $(patsubst %,$(UNIT_TEST_BIN)/%$X,$(UNIT_TEST_PROGRAMS))
      UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
      UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable.o
    +@@ Makefile: $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
    + 	$(OBJCOPY) --localize-hidden $^ $@
    + 
    + contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
    +-	$(AR) $(ARFLAGS) $@ $^
    ++	$(AR) $(ARFLAGS) $@ $^
    + \ No newline at end of file
     
      ## t/meson.build ##
     @@ t/meson.build: clar_test_suites = [
2:  cbe70c5c23 = 2:  3ae3b2cf9c t/unit-tests: convert reftable readwrite test to use clar
3:  38e2198eac ! 3:  d4303eb913 t/unit-tests: convert reftable record test to use clar
    @@ Makefile: CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
      UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
     
      ## t/meson.build ##
    -@@ t/meson.build: clar_test_suites = [
    -   'unit-tests/u-reftable-merged.c',
    -   'unit-tests/u-reftable-pq.c',
    -   'unit-tests/u-reftable-readwrite.c',
    -+  'unit-tests/u-reftable-record.c',
    -   'unit-tests/u-reftable-table.c',
    -   'unit-tests/u-reftable-tree.c',
    -   'unit-tests/u-strbuf.c',
     @@ t/meson.build: clar_unit_tests = executable('unit-tests',
      test('unit-tests', clar_unit_tests)
      
4:  8de9dbbd3b ! 4:  df582f6e2c t/unit-tests: convert reftable stack test to use clar
    @@ Makefile: CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
     
      ## t/meson.build ##
     @@ t/meson.build: clar_test_suites = [
    +   'unit-tests/u-reftable-merged.c',
        'unit-tests/u-reftable-pq.c',
        'unit-tests/u-reftable-readwrite.c',
    -   'unit-tests/u-reftable-record.c',
    ++  'unit-tests/u-reftable-record.c',
     +  'unit-tests/u-reftable-stack.c',
        'unit-tests/u-reftable-table.c',
        'unit-tests/u-reftable-tree.c',
5:  a69c3370ee ! 5:  9340e7ce88 t/unit-tests: finalize migration of reftable-related tests
    @@ Makefile: CLAR_TEST_SUITES += u-urlmatch-normalization
      
      # xdiff and reftable libs may in turn depend on what is in libgit.a
      GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(LIB_FILE)
    +@@ Makefile: $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
    + 	$(OBJCOPY) --localize-hidden $^ $@
    + 
    + contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
    +-	$(AR) $(ARFLAGS) $@ $^
    + \ No newline at end of file
    ++	$(AR) $(ARFLAGS) $@ $^
     
      ## t/Makefile ##
     @@ t/Makefile: check-meson:
-- 
2.43.0


  parent reply	other threads:[~2025-07-24 13:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 14:06 [PATCH v4 00/10] t/unit-tests: convert unit-tests to use clar Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 01/10] t/unit-tests: implement clar specific reftable test helper functions Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 02/10] t/unit-tests: convert reftable basics test to use clar test framework Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 03/10] t/unit-tests: convert reftable block test to use clar Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 04/10] t/unit-tests: convert reftable merged " Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 05/10] t/unit-tests: convert reftable pq " Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 06/10] t/unit-tests: convert reftable table " Seyi Kuforiji
2025-06-05 17:04   ` Junio C Hamano
2025-06-05 14:06 ` [PATCH v4 07/10] t/unit-tests: convert reftable readwrite " Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 08/10] t/unit-tests: convert reftable record " Seyi Kuforiji
2025-06-05 14:06 ` [PATCH v4 09/10] t/unit-tests: convert reftable stack " Seyi Kuforiji
2025-07-24  6:47   ` Patrick Steinhardt
2025-06-05 14:06 ` [PATCH v4 10/10] t/unit-tests: finalize migration of reftable-related tests Seyi Kuforiji
2025-07-23 21:30 ` [PATCH v4 00/10] t/unit-tests: convert unit-tests to use clar Junio C Hamano
2025-07-24  6:47   ` Patrick Steinhardt
2025-07-24 13:28 ` Seyi Kufoiji [this message]
2025-07-24 13:28   ` [PATCH v5 1/5] t/unit-tests: convert reftable table test " Seyi Kufoiji
2025-07-24 13:28   ` [PATCH v5 2/5] t/unit-tests: convert reftable readwrite " Seyi Kufoiji
2025-07-24 13:28   ` [PATCH v5 3/5] t/unit-tests: convert reftable record " Seyi Kufoiji
2025-07-24 13:28   ` [PATCH v5 4/5] t/unit-tests: convert reftable stack " Seyi Kufoiji
2025-07-24 14:28 ` [PATCH v5 00/10] t/unit-tests: convert unit-tests " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 01/10] t/unit-tests: implement clar specific reftable test helper functions Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 02/10] t/unit-tests: convert reftable basics test to use clar test framework Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 03/10] t/unit-tests: convert reftable block test to use clar Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 04/10] t/unit-tests: convert reftable merged " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 05/10] t/unit-tests: convert reftable pq " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 06/10] t/unit-tests: convert reftable table " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 07/10] t/unit-tests: convert reftable readwrite " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 08/10] t/unit-tests: convert reftable record " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 09/10] t/unit-tests: convert reftable stack " Seyi Kufoiji
2025-07-24 14:28   ` [PATCH v5 10/10] t/unit-tests: finalize migration of reftable-related tests Seyi Kufoiji
2025-07-24 14:41   ` [PATCH v5 00/10] t/unit-tests: convert unit-tests to use clar Patrick Steinhardt
2025-07-24 18:48     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250724132813.59627-1-kuforiji98@gmail.com \
    --to=kuforiji98@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ibed@apolop2p.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).