t/unit-tests: finalize migration of reftable-related tests

The old `lib-reftable.{c,h}` implemented helper functions for our
homegrown unit-testing framework. As part of migrating reftable-related
tests to the Clar framework, Clar-specific versions of these functions
in `lib-reftable-clar.{c,h}` were introduced.

Now that all test files using these helpers have been converted to Clar,
we can safely remove the original `lib-reftable.{c,h}` and rename the
Clar- specific versions back to `lib-reftable.{c,h}`. This restores a
clean and consistent naming scheme for shared test utilities.

Finally, update our build system to reflect the changes made and remove
redundant code related to the reftable tests and our old homegrown
unit-testing setup. `test-lib.{c,h}` remains unchanged in our build
system as some files particularly `t/helper/test-example-tap.c` depends
on it in order to run, and removing that would be beyond the scope of
this patch.

Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Seyi Kuforiji
2025-07-24 15:28:37 +01:00
committed by Junio C Hamano
parent 1cfd187fc1
commit 9bbc981c6f
15 changed files with 38 additions and 179 deletions

View File

@@ -10,7 +10,7 @@ https://developers.google.com/open-source/licenses/bsd
#include "unit-test.h"
#include "dir.h"
#include "lib-reftable-clar.h"
#include "lib-reftable.h"
#include "reftable/merged.h"
#include "reftable/reftable-error.h"
#include "reftable/stack.h"
@@ -497,7 +497,7 @@ void test_reftable_stack__add(void)
struct reftable_buf path = REFTABLE_BUF_INIT;
struct stat stat_result;
size_t i, N = ARRAY_SIZE(refs);
int err;
int err = 0;
err = reftable_new_stack(&st, dir, &opts);
cl_assert(!err);