t/helper: merge test-drop-caches 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 1c854745bdd9e1c49d8befb7611cc74e7194b5b8
5 files changed +11 -8
Makefile
+1 -1
@@ -657,10 +657,10 @@ TEST_BUILTINS_OBJS += test-config.o
657 TEST_BUILTINS_OBJS += test-ctype.o
658 TEST_BUILTINS_OBJS += test-date.o
659 TEST_BUILTINS_OBJS += test-delta.o
660 +TEST_BUILTINS_OBJS += test-drop-caches.o
661 TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
662 TEST_BUILTINS_OBJS += test-sha1.o
663
663 -TEST_PROGRAMS_NEED_X += test-drop-caches
664 TEST_PROGRAMS_NEED_X += test-dump-cache-tree
665 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
666 TEST_PROGRAMS_NEED_X += test-dump-split-index
t/helper/test-drop-caches.c
+2 -1
@@ -1,3 +1,4 @@
1 +#include "test-tool.h"
2 #include "git-compat-util.h"
3
4 #if defined(GIT_WINDOWS_NATIVE)
@@ -157,7 +158,7 @@ static int cmd_dropcaches(void)
158
159 #endif
160
160 -int cmd_main(int argc, const char **argv)
161 +int cmd__drop_caches(int argc, const char **argv)
162 {
163 cmd_sync();
164 return cmd_dropcaches();
t/helper/test-tool.c
+1
@@ -12,6 +12,7 @@ static struct test_cmd cmds[] = {
12 { "ctype", cmd__ctype },
13 { "date", cmd__date },
14 { "delta", cmd__delta },
15 + { "drop-caches", cmd__drop_caches },
16 { "lazy-init-name-hash", cmd__lazy_init_name_hash },
17 { "sha1", cmd__sha1 },
18 };
t/helper/test-tool.h
+1
@@ -6,6 +6,7 @@ int cmd__config(int argc, const char **argv);
6 int cmd__ctype(int argc, const char **argv);
7 int cmd__date(int argc, const char **argv);
8 int cmd__delta(int argc, const char **argv);
9 +int cmd__drop_caches(int argc, const char **argv);
10 int cmd__lazy_init_name_hash(int argc, const char **argv);
11 int cmd__sha1(int argc, const char **argv);
12
t/perf/p7519-fsmonitor.sh
+6 -6
@@ -118,7 +118,7 @@ test_expect_success "setup for fsmonitor" '
118 '
119
120 if test -n "$GIT_PERF_7519_DROP_CACHE"; then
121 - test-drop-caches
121 + test-tool drop-caches
122 fi
123
124 test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -126,7 +126,7 @@ test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
126 '
127
128 if test -n "$GIT_PERF_7519_DROP_CACHE"; then
129 - test-drop-caches
129 + test-tool drop-caches
130 fi
131
132 test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -134,7 +134,7 @@ test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
134 '
135
136 if test -n "$GIT_PERF_7519_DROP_CACHE"; then
137 - test-drop-caches
137 + test-tool drop-caches
138 fi
139
140 test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -148,7 +148,7 @@ test_expect_success "setup without fsmonitor" '
148 '
149
150 if test -n "$GIT_PERF_7519_DROP_CACHE"; then
151 - test-drop-caches
151 + test-tool drop-caches
152 fi
153
154 test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -156,7 +156,7 @@ test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
156 '
157
158 if test -n "$GIT_PERF_7519_DROP_CACHE"; then
159 - test-drop-caches
159 + test-tool drop-caches
160 fi
161
162 test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -164,7 +164,7 @@ test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
164 '
165
166 if test -n "$GIT_PERF_7519_DROP_CACHE"; then
167 - test-drop-caches
167 + test-tool drop-caches
168 fi
169
170 test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" '