t/helper: merge test-ref-store 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>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2018-03-24 08:44:52 +01:00 коммит произвёл Junio C Hamano
Родитель 5fbe600cb5
Коммит 65370d81ef
7 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -672,6 +672,7 @@ TEST_BUILTINS_OBJS += test-online-cpus.o
TEST_BUILTINS_OBJS += test-path-utils.o TEST_BUILTINS_OBJS += test-path-utils.o
TEST_BUILTINS_OBJS += test-prio-queue.o TEST_BUILTINS_OBJS += test-prio-queue.o
TEST_BUILTINS_OBJS += test-read-cache.o TEST_BUILTINS_OBJS += test-read-cache.o
TEST_BUILTINS_OBJS += test-ref-store.o
TEST_BUILTINS_OBJS += test-sha1.o TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor 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-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache 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-regex
TEST_PROGRAMS_NEED_X += test-revision-walking TEST_PROGRAMS_NEED_X += test-revision-walking
TEST_PROGRAMS_NEED_X += test-run-command TEST_PROGRAMS_NEED_X += test-run-command

Просмотреть файл

@ -1,3 +1,4 @@
#include "test-tool.h"
#include "cache.h" #include "cache.h"
#include "refs.h" #include "refs.h"
#include "worktree.h" #include "worktree.h"
@ -274,7 +275,7 @@ static struct command commands[] = {
{ NULL, NULL } { NULL, NULL }
}; };
int cmd_main(int argc, const char **argv) int cmd__ref_store(int argc, const char **argv)
{ {
struct ref_store *refs; struct ref_store *refs;
const char *func; const char *func;

Просмотреть файл

@ -27,6 +27,7 @@ static struct test_cmd cmds[] = {
{ "path-utils", cmd__path_utils }, { "path-utils", cmd__path_utils },
{ "prio-queue", cmd__prio_queue }, { "prio-queue", cmd__prio_queue },
{ "read-cache", cmd__read_cache }, { "read-cache", cmd__read_cache },
{ "ref-store", cmd__ref_store },
{ "sha1", cmd__sha1 }, { "sha1", cmd__sha1 },
}; };

Просмотреть файл

@ -21,6 +21,7 @@ int cmd__online_cpus(int argc, const char **argv);
int cmd__path_utils(int argc, const char **argv); int cmd__path_utils(int argc, const char **argv);
int cmd__prio_queue(int argc, const char **argv); int cmd__prio_queue(int argc, const char **argv);
int cmd__read_cache(int argc, const char **argv); int cmd__read_cache(int argc, const char **argv);
int cmd__ref_store(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv); int cmd__sha1(int argc, const char **argv);
#endif #endif

Просмотреть файл

@ -4,7 +4,7 @@ test_description='test main ref store api'
. ./test-lib.sh . ./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_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
test_commit one && test_commit one &&

Просмотреть файл

@ -4,7 +4,7 @@ test_description='test submodule ref store api'
. ./test-lib.sh . ./test-lib.sh
RUN="test-ref-store submodule:sub" RUN="test-tool ref-store submodule:sub"
test_expect_success 'setup' ' test_expect_success 'setup' '
git init sub && git init sub &&

Просмотреть файл

@ -4,8 +4,8 @@ test_description='test worktree ref store api'
. ./test-lib.sh . ./test-lib.sh
RWT="test-ref-store worktree:wt" RWT="test-tool ref-store worktree:wt"
RMAIN="test-ref-store worktree:main" RMAIN="test-tool ref-store worktree:main"
test_expect_success 'setup' ' test_expect_success 'setup' '
test_commit first && test_commit first &&