]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/helper: merge test-revision-walking into test-tool
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:54 +0000 (08:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000 (08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-revision-walking.c
t/helper/test-tool.c
t/helper/test-tool.h
t/t0062-revision-walking.sh

index 7444c00bbba8468aa11b31307b6fd60430dea070..3ed461cd5521fc7ddb8f060091e7e039f3643f1c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -674,6 +674,7 @@ 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-regex.o
+TEST_BUILTINS_OBJS += test-revision-walking.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -682,7 +683,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-revision-walking
 TEST_PROGRAMS_NEED_X += test-run-command
 TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
 TEST_PROGRAMS_NEED_X += test-sha1-array
index b8e6fe1d007449d30dd30ccd4319b26f151bbf23..4f8bc758213c47906d3dc1a4d4e02df2737c508d 100644 (file)
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 
+#include "test-tool.h"
 #include "cache.h"
 #include "commit.h"
 #include "diff.h"
@@ -45,7 +46,7 @@ static int run_revision_walk(void)
        return got_revision;
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__revision_walking(int argc, const char **argv)
 {
        if (argc < 2)
                return 1;
index 37f17334dc640060d11dcb4e8604b12298640b0b..7da5fb4d83ce892d6cd2cba92d615f32ad6b95b0 100644 (file)
@@ -29,6 +29,7 @@ static struct test_cmd cmds[] = {
        { "read-cache", cmd__read_cache },
        { "ref-store", cmd__ref_store },
        { "regex", cmd__regex },
+       { "revision-walking", cmd__revision_walking },
        { "sha1", cmd__sha1 },
 };
 
index 5f73c83ac002f3a22b9d70ad1c16dc32fe3fd11c..4dff2206462a6b889d9084a4903beb736ebedbb2 100644 (file)
@@ -23,6 +23,7 @@ int cmd__prio_queue(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__regex(int argc, const char **argv);
+int cmd__revision_walking(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
index 113c728e676679f8e8e8eb0fce433a84bbee8050..8e215867b8c197dedef32c569e1d1f632d22b631 100755 (executable)
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
 '
 
 test_expect_success 'revision walking can be done twice' '
-       test-revision-walking run-twice >run_twice_actual &&
+       test-tool revision-walking run-twice >run_twice_actual &&
        test_cmp run_twice_expected run_twice_actual
 '