Skip to content

t/unit-tests: convert unit-tests to use clar

Seyi Kufoiji git 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest posting 2/210 patches 2 repliesIn review
  2. v5 posting 1/24 of 5 patches 0 repliesSuperseded
  3. v410 patches 4 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v3 posting 3/310 patches15 repliesSuperseded
v2 posting 4/410 patches20 repliesSuperseded
v3 posting 2/34 patches0 repliesSuperseded
v2 posting 3/44 patches3 repliesSuperseded
v2 posting 2/44 patches6 repliesApplied
v3 posting 1/34 patches2 repliesSuperseded
v2 posting 1/44 patches4 repliesSuperseded
v14 patches4 repliesSuperseded

Changes in v5 from the cover letter

- some code refactoring and cleanup based on review.

Patches in v5 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10t/unit-tests: implement clar specific reftable test helper functionsMakefile t/meson.build t/unit-tests/lib-reftable-clar.c +1 more+124 -10 replies
2/10t/unit-tests: convert reftable basics test to use clar test frameworkMakefile t/meson.build t/unit-tests/t-reftable-basics.c +1 more+229 -2210 replies
3/10t/unit-tests: convert reftable block test to use clarMakefile t/meson.build t/unit-tests/u-reftable-block.c+80 -880 replies
4/10t/unit-tests: convert reftable merged test to use clarMakefile t/meson.build t/unit-tests/u-reftable-merged.c+72 -940 replies
5/10t/unit-tests: convert reftable pq test to use clarMakefile t/meson.build t/unit-tests/u-reftable-pq.c+30 -340 replies
6/10t/unit-tests: convert reftable table test to use clarMakefile t/meson.build t/unit-tests/u-reftable-table.c+38 -440 replies
7/10t/unit-tests: convert reftable readwrite test to use clarMakefile t/meson.build t/unit-tests/u-reftable-readwrite.c+179 -2300 replies
8/10t/unit-tests: convert reftable record test to use clarMakefile t/meson.build t/unit-tests/u-reftable-record.c+131 -1220 replies
9/10t/unit-tests: convert reftable stack test to use clarMakefile t/meson.build t/unit-tests/u-reftable-stack.c+332 -4540 replies
10/10t/unit-tests: finalize migration of reftable-related testsMakefile t/Makefile t/meson.build +12 more+38 -1790 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 00/10] t/unit-tests: convert unit-tests to use clar

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

Seyi Kuforiji (10):
t/unit-tests: implement clar specific reftable test helper functions t/unit-tests: convert reftable basics test to use clar test framework t/unit-tests: convert reftable block test to use clar t/unit-tests: convert reftable merged test to use clar t/unit-tests: convert reftable pq test to use clar 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                                      |  20 +-
 t/Makefile                                    |   1 -
 t/meson.build                                 |  42 +-
 t/unit-tests/lib-reftable.c                   |  35 +-
 t/unit-tests/lib-reftable.h                   |  15 +-
 t/unit-tests/t-reftable-basics.c              | 219 -----
 t/unit-tests/u-reftable-basics.c              | 227 +++++
 ...{t-reftable-block.c => u-reftable-block.c} | 164 ++--
 ...-reftable-merged.c => u-reftable-merged.c} | 160 ++--
 .../{t-reftable-pq.c => u-reftable-pq.c}      |  59 +-
 ...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 +-
 14 files changed, 1117 insertions(+), 1331 deletions(-)
 delete mode 100644 t/unit-tests/t-reftable-basics.c
 create mode 100644 t/unit-tests/u-reftable-basics.c
 rename t/unit-tests/{t-reftable-block.c => u-reftable-block.c} (74%)
 rename t/unit-tests/{t-reftable-merged.c => u-reftable-merged.c} (77%)
 rename t/unit-tests/{t-reftable-pq.c => u-reftable-pq.c} (64%)
 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:  4a04557ae3 t/unit-tests: implement clar specific reftable test helper functions
 -:  ---------- >  2:  2c576ddd11 t/unit-tests: convert reftable basics test to use clar test framework
 -:  ---------- >  3:  04d54fef89 t/unit-tests: convert reftable block test to use clar
 -:  ---------- >  4:  06eba27f8e t/unit-tests: convert reftable merged test to use clar
 -:  ---------- >  5:  eaa8b8d636 t/unit-tests: convert reftable pq test to use clar
 1:  7c159bd2fe !  6:  cf8b0471fd 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:  3ae3b2cf9c =  7:  cbe70c5c23 t/unit-tests: convert reftable readwrite test to use clar
 3:  d4303eb913 !  8:  38e2198eac 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: df582f6e2c ! 9: 8de9dbbd3b 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:  9340e7ce88 ! 10:  a69c3370ee 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:
Signature · 1 line
2.43.0