Skip to content

Commit 5fbe600

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-read-cache 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 15b7581 commit 5fbe600

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
@@ -671,14 +671,14 @@ TEST_BUILTINS_OBJS += test-mktemp.o
671671
TEST_BUILTINS_OBJS += test-online-cpus.o
672672
TEST_BUILTINS_OBJS += test-path-utils.o
673673
TEST_BUILTINS_OBJS += test-prio-queue.o
674+
TEST_BUILTINS_OBJS += test-read-cache.o
674675
TEST_BUILTINS_OBJS += test-sha1.o
675676

676677
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
677678
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
678679
TEST_PROGRAMS_NEED_X += test-fake-ssh
679680
TEST_PROGRAMS_NEED_X += test-line-buffer
680681
TEST_PROGRAMS_NEED_X += test-parse-options
681-
TEST_PROGRAMS_NEED_X += test-read-cache
682682
TEST_PROGRAMS_NEED_X += test-write-cache
683683
TEST_PROGRAMS_NEED_X += test-ref-store
684684
TEST_PROGRAMS_NEED_X += test-regex

t/helper/test-read-cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
#include "test-tool.h"
12
#include "cache.h"
23

3-
int cmd_main(int argc, const char **argv)
4+
int cmd__read_cache(int argc, const char **argv)
45
{
56
int i, cnt = 1;
67
if (argc == 2)

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = {
2626
{ "online-cpus", cmd__online_cpus },
2727
{ "path-utils", cmd__path_utils },
2828
{ "prio-queue", cmd__prio_queue },
29+
{ "read-cache", cmd__read_cache },
2930
{ "sha1", cmd__sha1 },
3031
};
3132

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ int cmd__mktemp(int argc, const char **argv);
2020
int cmd__online_cpus(int argc, const char **argv);
2121
int cmd__path_utils(int argc, const char **argv);
2222
int cmd__prio_queue(int argc, const char **argv);
23+
int cmd__read_cache(int argc, const char **argv);
2324
int cmd__sha1(int argc, const char **argv);
2425

2526
#endif

t/perf/p0002-read-cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test_perf_default_repo
88

99
count=1000
1010
test_perf "read_cache/discard_cache $count times" "
11-
test-read-cache $count
11+
test-tool read-cache $count
1212
"
1313

1414
test_done

0 commit comments

Comments
 (0)