Skip to content

Commit 1cfd187

Browse files
Seyi007gitster
authored andcommitted
t/unit-tests: convert reftable stack test to use clar
Adapt reftable stack test file to use clar by using clar assertions where necessary. This marks the end of all unit tests migrated away from the `unit-tests/t-*.c` pattern, there are no longer any files matching that glob. Remove the sanity check for `t-*.c` files to prevent Meson configuration errors during CI and local builds. Signed-off-by: Seyi Kuforiji <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2596bef commit 1cfd187

File tree

3 files changed

+332
-454
lines changed

3 files changed

+332
-454
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ CLAR_TEST_SUITES += u-reftable-block
13691369
CLAR_TEST_SUITES += u-reftable-merged
13701370
CLAR_TEST_SUITES += u-reftable-pq
13711371
CLAR_TEST_SUITES += u-reftable-readwrite
1372+
CLAR_TEST_SUITES += u-reftable-stack
13721373
CLAR_TEST_SUITES += u-reftable-table
13731374
CLAR_TEST_SUITES += u-reftable-tree
13741375
CLAR_TEST_SUITES += u-strbuf
@@ -1383,7 +1384,6 @@ CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
13831384
CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/lib-oid.o
13841385
CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable-clar.o
13851386

1386-
UNIT_TEST_PROGRAMS += t-reftable-stack
13871387
UNIT_TEST_PROGS = $(patsubst %,$(UNIT_TEST_BIN)/%$X,$(UNIT_TEST_PROGRAMS))
13881388
UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
13891389
UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable.o

t/meson.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ clar_test_suites = [
1414
'unit-tests/u-reftable-pq.c',
1515
'unit-tests/u-reftable-readwrite.c',
1616
'unit-tests/u-reftable-record.c',
17+
'unit-tests/u-reftable-stack.c',
1718
'unit-tests/u-reftable-table.c',
1819
'unit-tests/u-reftable-tree.c',
1920
'unit-tests/u-strbuf.c',
@@ -62,7 +63,6 @@ clar_unit_tests = executable('unit-tests',
6263
test('unit-tests', clar_unit_tests)
6364

6465
unit_test_programs = [
65-
'unit-tests/t-reftable-stack.c',
6666
]
6767

6868
foreach unit_test_program : unit_test_programs
@@ -1164,8 +1164,6 @@ benchmarks = [
11641164
# sufficient to catch missing test suites in our CI though.
11651165
foreach glob, tests : {
11661166
't[0-9][0-9][0-9][0-9]-*.sh': integration_tests,
1167-
'perf/p[0-9][0-9][0-9][0-9]-*.sh': benchmarks,
1168-
'unit-tests/t-*.c': unit_test_programs,
11691167
'unit-tests/u-*.c': clar_test_suites,
11701168
}
11711169
actual_tests = run_command(shell, '-c', 'ls ' + glob,

0 commit comments

Comments
 (0)