summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-24 07:44:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-27 15:45:47 (GMT)
commit1c854745bdd9e1c49d8befb7611cc74e7194b5b8 (patch)
treec18718fc0fc15daf0537ad6cd38b4da52d8610bd /t
parent9153dde5e2ec0c424e5468aa2aff8cec04214770 (diff)
downloadgit-1c854745bdd9e1c49d8befb7611cc74e7194b5b8.zip
git-1c854745bdd9e1c49d8befb7611cc74e7194b5b8.tar.gz
git-1c854745bdd9e1c49d8befb7611cc74e7194b5b8.tar.bz2
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>
Diffstat (limited to 't')
-rw-r--r--t/helper/test-drop-caches.c3
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
-rwxr-xr-xt/perf/p7519-fsmonitor.sh12
4 files changed, 10 insertions, 7 deletions
diff --git a/t/helper/test-drop-caches.c b/t/helper/test-drop-caches.c
index bd1a857..8387608 100644
--- a/t/helper/test-drop-caches.c
+++ b/t/helper/test-drop-caches.c
@@ -1,3 +1,4 @@
+#include "test-tool.h"
#include "git-compat-util.h"
#if defined(GIT_WINDOWS_NATIVE)
@@ -157,7 +158,7 @@ static int cmd_dropcaches(void)
#endif
-int cmd_main(int argc, const char **argv)
+int cmd__drop_caches(int argc, const char **argv)
{
cmd_sync();
return cmd_dropcaches();
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 52d30b8..3ebd962 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -12,6 +12,7 @@ static struct test_cmd cmds[] = {
{ "ctype", cmd__ctype },
{ "date", cmd__date },
{ "delta", cmd__delta },
+ { "drop-caches", cmd__drop_caches },
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
{ "sha1", cmd__sha1 },
};
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 761705e..f585b77 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -6,6 +6,7 @@ int cmd__config(int argc, const char **argv);
int cmd__ctype(int argc, const char **argv);
int cmd__date(int argc, const char **argv);
int cmd__delta(int argc, const char **argv);
+int cmd__drop_caches(int argc, const char **argv);
int cmd__lazy_init_name_hash(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index 65e145c..def7ecd 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -118,7 +118,7 @@ test_expect_success "setup for fsmonitor" '
'
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
- test-drop-caches
+ test-tool drop-caches
fi
test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -126,7 +126,7 @@ test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
'
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
- test-drop-caches
+ test-tool drop-caches
fi
test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -134,7 +134,7 @@ test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
'
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
- test-drop-caches
+ test-tool drop-caches
fi
test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -148,7 +148,7 @@ test_expect_success "setup without fsmonitor" '
'
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
- test-drop-caches
+ test-tool drop-caches
fi
test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -156,7 +156,7 @@ test_perf "status (fsmonitor=$INTEGRATION_SCRIPT)" '
'
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
- test-drop-caches
+ test-tool drop-caches
fi
test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
@@ -164,7 +164,7 @@ test_perf "status -uno (fsmonitor=$INTEGRATION_SCRIPT)" '
'
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
- test-drop-caches
+ test-tool drop-caches
fi
test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" '