t/helper: merge test-read-cache 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
5fbe600cb5e4c54e859b5d0b0ca59658781fce93
5 files changed
+6
-3
Makefile
+1
-1
@@ -671,6 +671,7 @@ TEST_BUILTINS_OBJS += test-mktemp.o
671
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-sha1.o
676
677
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -678,7 +679,6 @@ TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
679
TEST_PROGRAMS_NEED_X += test-fake-ssh
680
TEST_PROGRAMS_NEED_X += test-line-buffer
681
TEST_PROGRAMS_NEED_X += test-parse-options
681
-TEST_PROGRAMS_NEED_X += test-read-cache
682
TEST_PROGRAMS_NEED_X += test-write-cache
683
TEST_PROGRAMS_NEED_X += test-ref-store
684
TEST_PROGRAMS_NEED_X += test-regex
t/helper/test-read-cache.c
+2
-1
@@ -1,6 +1,7 @@
1
+#include "test-tool.h"
2
#include "cache.h"
3
3
-int cmd_main(int argc, const char **argv)
4
+int cmd__read_cache(int argc, const char **argv)
5
{
6
int i, cnt = 1;
7
if (argc == 2)
t/helper/test-tool.c
+1
@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = {
26
{ "online-cpus", cmd__online_cpus },
27
{ "path-utils", cmd__path_utils },
28
{ "prio-queue", cmd__prio_queue },
29
+ { "read-cache", cmd__read_cache },
30
{ "sha1", cmd__sha1 },
31
};
32
t/helper/test-tool.h
+1
@@ -20,6 +20,7 @@ int cmd__mktemp(int argc, const char **argv);
20
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__sha1(int argc, const char **argv);
25
26
#endif
t/perf/p0002-read-cache.sh
+1
-1
@@ -8,7 +8,7 @@ test_perf_default_repo
8
9
count=1000
10
test_perf "read_cache/discard_cache $count times" "
11
- test-read-cache $count
11
+ test-tool read-cache $count
12
"
13
14
test_done