Skip to content

Commit 77d4b8c

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-revision-walking into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9038531 commit 77d4b8c

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ TEST_BUILTINS_OBJS += test-prio-queue.o
674674
TEST_BUILTINS_OBJS += test-read-cache.o
675675
TEST_BUILTINS_OBJS += test-ref-store.o
676676
TEST_BUILTINS_OBJS += test-regex.o
677+
TEST_BUILTINS_OBJS += test-revision-walking.o
677678
TEST_BUILTINS_OBJS += test-sha1.o
678679

679680
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -682,7 +683,6 @@ TEST_PROGRAMS_NEED_X += test-fake-ssh
682683
TEST_PROGRAMS_NEED_X += test-line-buffer
683684
TEST_PROGRAMS_NEED_X += test-parse-options
684685
TEST_PROGRAMS_NEED_X += test-write-cache
685-
TEST_PROGRAMS_NEED_X += test-revision-walking
686686
TEST_PROGRAMS_NEED_X += test-run-command
687687
TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
688688
TEST_PROGRAMS_NEED_X += test-sha1-array

t/helper/test-revision-walking.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* published by the Free Software Foundation.
99
*/
1010

11+
#include "test-tool.h"
1112
#include "cache.h"
1213
#include "commit.h"
1314
#include "diff.h"
@@ -45,7 +46,7 @@ static int run_revision_walk(void)
4546
return got_revision;
4647
}
4748

48-
int cmd_main(int argc, const char **argv)
49+
int cmd__revision_walking(int argc, const char **argv)
4950
{
5051
if (argc < 2)
5152
return 1;

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ static struct test_cmd cmds[] = {
2929
{ "read-cache", cmd__read_cache },
3030
{ "ref-store", cmd__ref_store },
3131
{ "regex", cmd__regex },
32+
{ "revision-walking", cmd__revision_walking },
3233
{ "sha1", cmd__sha1 },
3334
};
3435

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ int cmd__prio_queue(int argc, const char **argv);
2323
int cmd__read_cache(int argc, const char **argv);
2424
int cmd__ref_store(int argc, const char **argv);
2525
int cmd__regex(int argc, const char **argv);
26+
int cmd__revision_walking(int argc, const char **argv);
2627
int cmd__sha1(int argc, const char **argv);
2728

2829
#endif

t/t0062-revision-walking.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
2626
'
2727

2828
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 &&
3030
test_cmp run_twice_expected run_twice_actual
3131
'
3232

0 commit comments

Comments
 (0)