Skip to content

Commit 65370d8

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-ref-store into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fbe600 commit 65370d8

File tree

7 files changed

+9
-6
lines changed

7 files changed

+9
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ TEST_BUILTINS_OBJS += test-online-cpus.o
672672
TEST_BUILTINS_OBJS += test-path-utils.o
673673
TEST_BUILTINS_OBJS += test-prio-queue.o
674674
TEST_BUILTINS_OBJS += test-read-cache.o
675+
TEST_BUILTINS_OBJS += test-ref-store.o
675676
TEST_BUILTINS_OBJS += test-sha1.o
676677

677678
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -680,7 +681,6 @@ TEST_PROGRAMS_NEED_X += test-fake-ssh
680681
TEST_PROGRAMS_NEED_X += test-line-buffer
681682
TEST_PROGRAMS_NEED_X += test-parse-options
682683
TEST_PROGRAMS_NEED_X += test-write-cache
683-
TEST_PROGRAMS_NEED_X += test-ref-store
684684
TEST_PROGRAMS_NEED_X += test-regex
685685
TEST_PROGRAMS_NEED_X += test-revision-walking
686686
TEST_PROGRAMS_NEED_X += test-run-command

t/helper/test-ref-store.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "test-tool.h"
12
#include "cache.h"
23
#include "refs.h"
34
#include "worktree.h"
@@ -274,7 +275,7 @@ static struct command commands[] = {
274275
{ NULL, NULL }
275276
};
276277

277-
int cmd_main(int argc, const char **argv)
278+
int cmd__ref_store(int argc, const char **argv)
278279
{
279280
struct ref_store *refs;
280281
const char *func;

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static struct test_cmd cmds[] = {
2727
{ "path-utils", cmd__path_utils },
2828
{ "prio-queue", cmd__prio_queue },
2929
{ "read-cache", cmd__read_cache },
30+
{ "ref-store", cmd__ref_store },
3031
{ "sha1", cmd__sha1 },
3132
};
3233

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ int cmd__online_cpus(int argc, const char **argv);
2121
int cmd__path_utils(int argc, const char **argv);
2222
int cmd__prio_queue(int argc, const char **argv);
2323
int cmd__read_cache(int argc, const char **argv);
24+
int cmd__ref_store(int argc, const char **argv);
2425
int cmd__sha1(int argc, const char **argv);
2526

2627
#endif

t/t1405-main-ref-store.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_description='test main ref store api'
44

55
. ./test-lib.sh
66

7-
RUN="test-ref-store main"
7+
RUN="test-tool ref-store main"
88

99
test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
1010
test_commit one &&

t/t1406-submodule-ref-store.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_description='test submodule ref store api'
44

55
. ./test-lib.sh
66

7-
RUN="test-ref-store submodule:sub"
7+
RUN="test-tool ref-store submodule:sub"
88

99
test_expect_success 'setup' '
1010
git init sub &&

t/t1407-worktree-ref-store.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ test_description='test worktree ref store api'
44

55
. ./test-lib.sh
66

7-
RWT="test-ref-store worktree:wt"
8-
RMAIN="test-ref-store worktree:main"
7+
RWT="test-tool ref-store worktree:wt"
8+
RMAIN="test-tool ref-store worktree:main"
99

1010
test_expect_success 'setup' '
1111
test_commit first &&

0 commit comments

Comments
 (0)