[PATCH 23/36] t/helper: merge test-ref-store into test-tool
From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2018-03-17 07:56:56
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-ref-store.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t1405-main-ref-store.sh | 2 +- t/t1406-submodule-ref-store.sh | 2 +- t/t1407-worktree-ref-store.sh | 4 ++-- 7 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 393fb9aca4..20080fddb8 100644
--- a/Makefile
+++ b/Makefile@@ -672,6 +672,7 @@ 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-ref-store.o TEST_BUILTINS_OBJS += test-sha1.o TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -680,7 +681,6 @@ 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-ref-store TEST_PROGRAMS_NEED_X += test-regex TEST_PROGRAMS_NEED_X += test-revision-walking TEST_PROGRAMS_NEED_X += test-run-command
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index 7120634b04..a797bc532b 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c@@ -1,3 +1,4 @@ +#include "test-tool.h" #include "cache.h" #include "refs.h" #include "worktree.h"
@@ -274,7 +275,7 @@ static struct command commands[] = { { NULL, NULL } }; -int cmd_main(int argc, const char **argv) +int test_ref_store(int argc, const char **argv) { struct ref_store *refs; const char *func;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index d82db3c90f..92bd38ac61 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c@@ -27,6 +27,7 @@ static struct test_cmd cmds[] = { { "path-utils", test_path_utils }, { "prio-queue", test_prio_queue }, { "read-cache", test_read_cache }, + { "ref-store", test_ref_store }, { "sha1", test_sha1 }, };
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 2c98cdde41..662d3c9645 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h@@ -21,6 +21,7 @@ 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_ref_store(int argc, const char **argv); int test_sha1(int argc, const char **argv); #endif
diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh
index e8115df5ba..a30a080b20 100755
--- a/t/t1405-main-ref-store.sh
+++ b/t/t1405-main-ref-store.sh@@ -4,7 +4,7 @@ test_description='test main ref store api' . ./test-lib.sh -RUN="test-ref-store main" +RUN="test-tool ref-store main" test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' ' test_commit one &&
diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh
index c32d4cc465..e093782cc3 100755
--- a/t/t1406-submodule-ref-store.sh
+++ b/t/t1406-submodule-ref-store.sh@@ -4,7 +4,7 @@ test_description='test submodule ref store api' . ./test-lib.sh -RUN="test-ref-store submodule:sub" +RUN="test-tool ref-store submodule:sub" test_expect_success 'setup' ' git init sub &&
diff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh
index 8842d0329f..2211f9831f 100755
--- a/t/t1407-worktree-ref-store.sh
+++ b/t/t1407-worktree-ref-store.sh@@ -4,8 +4,8 @@ test_description='test worktree ref store api' . ./test-lib.sh -RWT="test-ref-store worktree:wt" -RMAIN="test-ref-store worktree:main" +RWT="test-tool ref-store worktree:wt" +RMAIN="test-tool ref-store worktree:main" test_expect_success 'setup' ' test_commit first &&
--
2.16.2.903.gd04caf5039