Skip to content

Commit 6238fa0

Browse files
committed
Merge branch 'cp/unit-test-reftable-stack' into seen
Another reftable test migrated to the unit-test framework. * cp/unit-test-reftable-stack: t: clean up leftover reftable test cruft t-reftable-stack: add test for stack iterators t-reftable-stack: add test for non-default compaction factor t-reftable-stack: use reftable_ref_record_equal() to compare ref records t-reftable-stack: use Git's tempfile API instead of mkstemp() t: harmonize t-reftable-stack.c with coding guidelines t: move reftable/stack_test.c to the unit testing framework
2 parents ad5ad51 + c076c80 commit 6238fa0

File tree

7 files changed

+387
-305
lines changed

7 files changed

+387
-305
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ UNIT_TEST_PROGRAMS += t-reftable-merged
13651365
UNIT_TEST_PROGRAMS += t-reftable-pq
13661366
UNIT_TEST_PROGRAMS += t-reftable-readwrite
13671367
UNIT_TEST_PROGRAMS += t-reftable-record
1368+
UNIT_TEST_PROGRAMS += t-reftable-stack
13681369
UNIT_TEST_PROGRAMS += t-reftable-tree
13691370
UNIT_TEST_PROGRAMS += t-strbuf
13701371
UNIT_TEST_PROGRAMS += t-strcmp-offset
@@ -2709,7 +2710,6 @@ REFTABLE_OBJS += reftable/stack.o
27092710
REFTABLE_OBJS += reftable/tree.o
27102711
REFTABLE_OBJS += reftable/writer.o
27112712

2712-
REFTABLE_TEST_OBJS += reftable/stack_test.o
27132713
REFTABLE_TEST_OBJS += reftable/test_framework.o
27142714

27152715
TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))

reftable/reftable-tests.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ license that can be found in the LICENSE file or at
99
#ifndef REFTABLE_TESTS_H
1010
#define REFTABLE_TESTS_H
1111

12-
int stack_test_main(int argc, const char **argv);
1312

1413
#endif

t/helper/test-reftable.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
#include "reftable/reftable-tests.h"
1010
#include "test-tool.h"
1111

12-
int cmd__reftable(int argc, const char **argv)
13-
{
14-
/* test from simple to complex. */
15-
stack_test_main(argc, argv);
16-
return 0;
17-
}
18-
1912
static void print_help(void)
2013
{
2114
printf("usage: dump [-st] arg\n\n"

t/helper/test-tool.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = {
2626
{ "drop-caches", cmd__drop_caches },
2727
{ "dump-cache-tree", cmd__dump_cache_tree },
2828
{ "dump-fsmonitor", cmd__dump_fsmonitor },
29+
{ "dump-reftable", cmd__dump_reftable },
2930
{ "dump-split-index", cmd__dump_split_index },
3031
{ "dump-untracked-cache", cmd__dump_untracked_cache },
3132
{ "env-helper", cmd__env_helper },
@@ -60,9 +61,7 @@ static struct test_cmd cmds[] = {
6061
{ "read-graph", cmd__read_graph },
6162
{ "read-midx", cmd__read_midx },
6263
{ "ref-store", cmd__ref_store },
63-
{ "reftable", cmd__reftable },
6464
{ "rot13-filter", cmd__rot13_filter },
65-
{ "dump-reftable", cmd__dump_reftable },
6665
{ "regex", cmd__regex },
6766
{ "repository", cmd__repository },
6867
{ "revision-walking", cmd__revision_walking },

t/helper/test-tool.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ int cmd__read_graph(int argc, const char **argv);
5555
int cmd__read_midx(int argc, const char **argv);
5656
int cmd__ref_store(int argc, const char **argv);
5757
int cmd__rot13_filter(int argc, const char **argv);
58-
int cmd__reftable(int argc, const char **argv);
5958
int cmd__regex(int argc, const char **argv);
6059
int cmd__repository(int argc, const char **argv);
6160
int cmd__revision_walking(int argc, const char **argv);

t/t0032-reftable-unittest.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)