t/helper: merge test-revision-walking 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>

Nguyễn Thái Ngọc Duy committed Mar 24, 2018 at 08:44 UTC 77d4b8c8328c4a95f20b03b422020cf3af4b0e63
5 files changed +6 -3
Makefile
+1 -1
@@ -674,6 +674,7 @@ TEST_BUILTINS_OBJS += test-prio-queue.o
674 TEST_BUILTINS_OBJS += test-read-cache.o
675 TEST_BUILTINS_OBJS += test-ref-store.o
676 TEST_BUILTINS_OBJS += test-regex.o
677 +TEST_BUILTINS_OBJS += test-revision-walking.o
678 TEST_BUILTINS_OBJS += test-sha1.o
679
680 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -682,7 +683,6 @@ TEST_PROGRAMS_NEED_X += test-fake-ssh
683 TEST_PROGRAMS_NEED_X += test-line-buffer
684 TEST_PROGRAMS_NEED_X += test-parse-options
685 TEST_PROGRAMS_NEED_X += test-write-cache
685 -TEST_PROGRAMS_NEED_X += test-revision-walking
686 TEST_PROGRAMS_NEED_X += test-run-command
687 TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
688 TEST_PROGRAMS_NEED_X += test-sha1-array
t/helper/test-revision-walking.c
+2 -1
@@ -8,6 +8,7 @@
8 * published by the Free Software Foundation.
9 */
10
11 +#include "test-tool.h"
12 #include "cache.h"
13 #include "commit.h"
14 #include "diff.h"
@@ -45,7 +46,7 @@ static int run_revision_walk(void)
46 return got_revision;
47 }
48
48 -int cmd_main(int argc, const char **argv)
49 +int cmd__revision_walking(int argc, const char **argv)
50 {
51 if (argc < 2)
52 return 1;
t/helper/test-tool.c
+1
@@ -29,6 +29,7 @@ static struct test_cmd cmds[] = {
29 { "read-cache", cmd__read_cache },
30 { "ref-store", cmd__ref_store },
31 { "regex", cmd__regex },
32 + { "revision-walking", cmd__revision_walking },
33 { "sha1", cmd__sha1 },
34 };
35
t/helper/test-tool.h
+1
@@ -23,6 +23,7 @@ int cmd__prio_queue(int argc, const char **argv);
23 int cmd__read_cache(int argc, const char **argv);
24 int cmd__ref_store(int argc, const char **argv);
25 int cmd__regex(int argc, const char **argv);
26 +int cmd__revision_walking(int argc, const char **argv);
27 int cmd__sha1(int argc, const char **argv);
28
29 #endif
t/t0062-revision-walking.sh
+1 -1
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
26 '
27
28 test_expect_success 'revision walking can be done twice' '
29 - test-revision-walking run-twice >run_twice_actual &&
29 + test-tool revision-walking run-twice >run_twice_actual &&
30 test_cmp run_twice_expected run_twice_actual
31 '
32