Skip to content

Commit c81f843

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-write-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 0489289 commit c81f843

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
@@ -686,13 +686,13 @@ TEST_BUILTINS_OBJS += test-submodule-config.o
686686
TEST_BUILTINS_OBJS += test-subprocess.o
687687
TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
688688
TEST_BUILTINS_OBJS += test-wildmatch.o
689+
TEST_BUILTINS_OBJS += test-write-cache.o
689690

690691
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
691692
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
692693
TEST_PROGRAMS_NEED_X += test-fake-ssh
693694
TEST_PROGRAMS_NEED_X += test-line-buffer
694695
TEST_PROGRAMS_NEED_X += test-parse-options
695-
TEST_PROGRAMS_NEED_X += test-write-cache
696696
TEST_PROGRAMS_NEED_X += test-svn-fe
697697
TEST_PROGRAMS_NEED_X += test-tool
698698

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static struct test_cmd cmds[] = {
4141
{ "subprocess", cmd__subprocess },
4242
{ "urlmatch-normalization", cmd__urlmatch_normalization },
4343
{ "wildmatch", cmd__wildmatch },
44+
{ "write-cache", cmd__write_cache },
4445
};
4546

4647
int cmd_main(int argc, const char **argv)

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ int cmd__submodule_config(int argc, const char **argv);
3535
int cmd__subprocess(int argc, const char **argv);
3636
int cmd__urlmatch_normalization(int argc, const char **argv);
3737
int cmd__wildmatch(int argc, const char **argv);
38+
int cmd__write_cache(int argc, const char **argv);
3839

3940
#endif

t/helper/test-write-cache.c

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

45
static struct lock_file index_lock;
56

6-
int cmd_main(int argc, const char **argv)
7+
int cmd__write_cache(int argc, const char **argv)
78
{
89
int i, cnt = 1, lockfd;
910
if (argc == 2)

t/perf/p0007-write-cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test_expect_success "setup repo" '
2323

2424
count=3
2525
test_perf "write_locked_index $count times ($nr_files files)" "
26-
test-write-cache $count
26+
test-tool write-cache $count
2727
"
2828

2929
test_done

0 commit comments

Comments
 (0)