[PATCH 22/36] t/helepr: merge test-read-cache into test-tool
From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2018-03-17 07:56:05
Subsystem:
kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers:
Nathan Chancellor, Nicolas Schier, Linus Torvalds
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted> --- Makefile | 2 +- t/helper/test-read-cache.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/perf/p0002-read-cache.sh | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 076c778494..393fb9aca4 100644
--- a/Makefile
+++ b/Makefile@@ -671,6 +671,7 @@ TEST_BUILTINS_OBJS += test-mktemp.o TEST_BUILTINS_OBJS += test-online-cpus.o TEST_BUILTINS_OBJS += test-path-utils.o TEST_BUILTINS_OBJS += test-prio-queue.o +TEST_BUILTINS_OBJS += test-read-cache.o TEST_BUILTINS_OBJS += test-sha1.o TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -678,7 +679,6 @@ 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-read-cache TEST_PROGRAMS_NEED_X += test-write-cache TEST_PROGRAMS_NEED_X += test-ref-store TEST_PROGRAMS_NEED_X += test-regex
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c
index 48255eef31..cd38f09414 100644
--- a/t/helper/test-read-cache.c
+++ b/t/helper/test-read-cache.c@@ -1,6 +1,7 @@ +#include "test-tool.h" #include "cache.h" -int cmd_main(int argc, const char **argv) +int test_read_cache(int argc, const char **argv) { int i, cnt = 1; if (argc == 2)
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 24ce124868..d82db3c90f 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = { { "online-cpus", test_online_cpus }, { "path-utils", test_path_utils }, { "prio-queue", test_prio_queue }, + { "read-cache", test_read_cache }, { "sha1", test_sha1 }, };
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 713be481d5..2c98cdde41 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h@@ -20,6 +20,7 @@ int test_mktemp(int argc, const char **argv); int test_online_cpus(int argc, const char **argv); int test_path_utils(int argc, const char **argv); int test_prio_queue(int argc, const char **argv); +int test_read_cache(int argc, const char **argv); int test_sha1(int argc, const char **argv); #endif
diff --git a/t/perf/p0002-read-cache.sh b/t/perf/p0002-read-cache.sh
index 9180ae9343..cdd105a594 100755
--- a/t/perf/p0002-read-cache.sh
+++ b/t/perf/p0002-read-cache.sh@@ -8,7 +8,7 @@ test_perf_default_repo count=1000 test_perf "read_cache/discard_cache $count times" " - test-read-cache $count + test-tool read-cache $count " test_done
--
2.16.2.903.gd04caf5039