t/helper: merge test-ref-store into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Mar 24, 2018 at 08:44 UTC
65370d81ef9b32458302216c1ed8282253a83d3e
7 files changed
+9
-6
Makefile
+1
-1
@@ -672,6 +672,7 @@ TEST_BUILTINS_OBJS += test-online-cpus.o
672
TEST_BUILTINS_OBJS += test-path-utils.o
673
TEST_BUILTINS_OBJS += test-prio-queue.o
674
TEST_BUILTINS_OBJS += test-read-cache.o
675
+TEST_BUILTINS_OBJS += test-ref-store.o
676
TEST_BUILTINS_OBJS += test-sha1.o
677
678
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -680,7 +681,6 @@ TEST_PROGRAMS_NEED_X += test-fake-ssh
681
TEST_PROGRAMS_NEED_X += test-line-buffer
682
TEST_PROGRAMS_NEED_X += test-parse-options
683
TEST_PROGRAMS_NEED_X += test-write-cache
683
-TEST_PROGRAMS_NEED_X += test-ref-store
684
TEST_PROGRAMS_NEED_X += test-regex
685
TEST_PROGRAMS_NEED_X += test-revision-walking
686
TEST_PROGRAMS_NEED_X += test-run-command
t/helper/test-ref-store.c
+2
-1
@@ -1,3 +1,4 @@
1
+#include "test-tool.h"
2
#include "cache.h"
3
#include "refs.h"
4
#include "worktree.h"
@@ -274,7 +275,7 @@ static struct command commands[] = {
275
{ NULL, NULL }
276
};
277
277
-int cmd_main(int argc, const char **argv)
278
+int cmd__ref_store(int argc, const char **argv)
279
{
280
struct ref_store *refs;
281
const char *func;
t/helper/test-tool.c
+1
@@ -27,6 +27,7 @@ static struct test_cmd cmds[] = {
27
{ "path-utils", cmd__path_utils },
28
{ "prio-queue", cmd__prio_queue },
29
{ "read-cache", cmd__read_cache },
30
+ { "ref-store", cmd__ref_store },
31
{ "sha1", cmd__sha1 },
32
};
33
t/helper/test-tool.h
+1
@@ -21,6 +21,7 @@ int cmd__online_cpus(int argc, const char **argv);
21
int cmd__path_utils(int argc, const char **argv);
22
int cmd__prio_queue(int argc, const char **argv);
23
int cmd__read_cache(int argc, const char **argv);
24
+int cmd__ref_store(int argc, const char **argv);
25
int cmd__sha1(int argc, const char **argv);
26
27
#endif
t/t1405-main-ref-store.sh
+1
-1
@@ -4,7 +4,7 @@ test_description='test main ref store api'
4
5
. ./test-lib.sh
6
7
-RUN="test-ref-store main"
7
+RUN="test-tool ref-store main"
8
9
test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
10
test_commit one &&
t/t1406-submodule-ref-store.sh
+1
-1
@@ -4,7 +4,7 @@ test_description='test submodule ref store api'
4
5
. ./test-lib.sh
6
7
-RUN="test-ref-store submodule:sub"
7
+RUN="test-tool ref-store submodule:sub"
8
9
test_expect_success 'setup' '
10
git init sub &&
t/t1407-worktree-ref-store.sh
+2
-2
@@ -4,8 +4,8 @@ test_description='test worktree ref store api'
4
5
. ./test-lib.sh
6
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"
9
10
test_expect_success 'setup' '
11
test_commit first &&