t/helper: merge test-write-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:45 UTC
c81f843d0901c79150b1bf2fe528ad0c48267c24
5 files changed
+6
-3
Makefile
+1
-1
@@ -686,13 +686,13 @@ TEST_BUILTINS_OBJS += test-submodule-config.o
686
TEST_BUILTINS_OBJS += test-subprocess.o
687
TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
688
TEST_BUILTINS_OBJS += test-wildmatch.o
689
+TEST_BUILTINS_OBJS += test-write-cache.o
690
691
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
692
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
693
TEST_PROGRAMS_NEED_X += test-fake-ssh
694
TEST_PROGRAMS_NEED_X += test-line-buffer
695
TEST_PROGRAMS_NEED_X += test-parse-options
695
-TEST_PROGRAMS_NEED_X += test-write-cache
696
TEST_PROGRAMS_NEED_X += test-svn-fe
697
TEST_PROGRAMS_NEED_X += test-tool
698
t/helper/test-tool.c
+1
@@ -41,6 +41,7 @@ static struct test_cmd cmds[] = {
41
{ "subprocess", cmd__subprocess },
42
{ "urlmatch-normalization", cmd__urlmatch_normalization },
43
{ "wildmatch", cmd__wildmatch },
44
+ { "write-cache", cmd__write_cache },
45
};
46
47
int cmd_main(int argc, const char **argv)
t/helper/test-tool.h
+1
@@ -35,5 +35,6 @@ int cmd__submodule_config(int argc, const char **argv);
35
int cmd__subprocess(int argc, const char **argv);
36
int cmd__urlmatch_normalization(int argc, const char **argv);
37
int cmd__wildmatch(int argc, const char **argv);
38
+int cmd__write_cache(int argc, const char **argv);
39
40
#endif
t/helper/test-write-cache.c
+2
-1
@@ -1,9 +1,10 @@
1
+#include "test-tool.h"
2
#include "cache.h"
3
#include "lockfile.h"
4
5
static struct lock_file index_lock;
6
6
-int cmd_main(int argc, const char **argv)
7
+int cmd__write_cache(int argc, const char **argv)
8
{
9
int i, cnt = 1, lockfd;
10
if (argc == 2)
t/perf/p0007-write-cache.sh
+1
-1
@@ -23,7 +23,7 @@ test_expect_success "setup repo" '
23
24
count=3
25
test_perf "write_locked_index $count times ($nr_files files)" "
26
- test-write-cache $count
26
+ test-tool write-cache $count
27
"
28
29
test_done