summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
-rw-r--r--t/helper/test-write-cache.c3
-rwxr-xr-xt/perf/p0007-write-cache.sh2
5 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2ab76c6..8ad9a2a 100644
--- a/Makefile
+++ b/Makefile
@@ -686,13 +686,13 @@ TEST_BUILTINS_OBJS += test-submodule-config.o
TEST_BUILTINS_OBJS += test-subprocess.o
TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
TEST_BUILTINS_OBJS += test-wildmatch.o
+TEST_BUILTINS_OBJS += test-write-cache.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
-TEST_PROGRAMS_NEED_X += test-write-cache
TEST_PROGRAMS_NEED_X += test-svn-fe
TEST_PROGRAMS_NEED_X += test-tool
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 068adf4..87066ce 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -41,6 +41,7 @@ static struct test_cmd cmds[] = {
{ "subprocess", cmd__subprocess },
{ "urlmatch-normalization", cmd__urlmatch_normalization },
{ "wildmatch", cmd__wildmatch },
+ { "write-cache", cmd__write_cache },
};
int cmd_main(int argc, const char **argv)
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 84c583e..7116ddf 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -35,5 +35,6 @@ int cmd__submodule_config(int argc, const char **argv);
int cmd__subprocess(int argc, const char **argv);
int cmd__urlmatch_normalization(int argc, const char **argv);
int cmd__wildmatch(int argc, const char **argv);
+int cmd__write_cache(int argc, const char **argv);
#endif
diff --git a/t/helper/test-write-cache.c b/t/helper/test-write-cache.c
index b7ee039..017dc30 100644
--- a/t/helper/test-write-cache.c
+++ b/t/helper/test-write-cache.c
@@ -1,9 +1,10 @@
+#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"
static struct lock_file index_lock;
-int cmd_main(int argc, const char **argv)
+int cmd__write_cache(int argc, const char **argv)
{
int i, cnt = 1, lockfd;
if (argc == 2)
diff --git a/t/perf/p0007-write-cache.sh b/t/perf/p0007-write-cache.sh
index 261fe92..0959526 100755
--- a/t/perf/p0007-write-cache.sh
+++ b/t/perf/p0007-write-cache.sh
@@ -23,7 +23,7 @@ test_expect_success "setup repo" '
count=3
test_perf "write_locked_index $count times ($nr_files files)" "
- test-write-cache $count
+ test-tool write-cache $count
"
test_done