Skip to content

Commit f1ef0b0

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-dump-fsmonitor 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 2f17c78 commit f1ef0b0

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ TEST_BUILTINS_OBJS += test-date.o
709709
TEST_BUILTINS_OBJS += test-delta.o
710710
TEST_BUILTINS_OBJS += test-drop-caches.o
711711
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
712+
TEST_BUILTINS_OBJS += test-dump-fsmonitor.o
712713
TEST_BUILTINS_OBJS += test-dump-split-index.o
713714
TEST_BUILTINS_OBJS += test-dump-untracked-cache.o
714715
TEST_BUILTINS_OBJS += test-example-decorate.o
@@ -743,7 +744,6 @@ TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
743744
TEST_BUILTINS_OBJS += test-wildmatch.o
744745
TEST_BUILTINS_OBJS += test-write-cache.o
745746

746-
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
747747
TEST_PROGRAMS_NEED_X += test-fake-ssh
748748
TEST_PROGRAMS_NEED_X += test-line-buffer
749749
TEST_PROGRAMS_NEED_X += test-svn-fe

t/helper/test-dump-fsmonitor.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 ac, const char **av)
4+
int cmd__dump_fsmonitor(int ac, const char **av)
45
{
56
struct index_state *istate = &the_index;
67
int i;

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ static struct test_cmd cmds[] = {
1414
{ "delta", cmd__delta },
1515
{ "drop-caches", cmd__drop_caches },
1616
{ "dump-cache-tree", cmd__dump_cache_tree },
17+
{ "dump-fsmonitor", cmd__dump_fsmonitor },
1718
{ "dump-split-index", cmd__dump_split_index },
1819
{ "dump-untracked-cache", cmd__dump_untracked_cache },
1920
{ "example-decorate", cmd__example_decorate },

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ int cmd__date(int argc, const char **argv);
1010
int cmd__delta(int argc, const char **argv);
1111
int cmd__drop_caches(int argc, const char **argv);
1212
int cmd__dump_cache_tree(int argc, const char **argv);
13+
int cmd__dump_fsmonitor(int argc, const char **argv);
1314
int cmd__dump_split_index(int argc, const char **argv);
1415
int cmd__dump_untracked_cache(int argc, const char **argv);
1516
int cmd__example_decorate(int argc, const char **argv);

t/t7519-status-fsmonitor.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ test_expect_success 'setup' '
8484

8585
# test that the fsmonitor extension is off by default
8686
test_expect_success 'fsmonitor extension is off by default' '
87-
test-dump-fsmonitor >actual &&
87+
test-tool dump-fsmonitor >actual &&
8888
grep "^no fsmonitor" actual
8989
'
9090

9191
# test that "update-index --fsmonitor" adds the fsmonitor extension
9292
test_expect_success 'update-index --fsmonitor" adds the fsmonitor extension' '
9393
git update-index --fsmonitor &&
94-
test-dump-fsmonitor >actual &&
94+
test-tool dump-fsmonitor >actual &&
9595
grep "^fsmonitor last update" actual
9696
'
9797

9898
# test that "update-index --no-fsmonitor" removes the fsmonitor extension
9999
test_expect_success 'update-index --no-fsmonitor" removes the fsmonitor extension' '
100100
git update-index --no-fsmonitor &&
101-
test-dump-fsmonitor >actual &&
101+
test-tool dump-fsmonitor >actual &&
102102
grep "^no fsmonitor" actual
103103
'
104104

@@ -307,9 +307,9 @@ test_expect_success 'splitting the index results in the same state' '
307307
dirty_repo &&
308308
git update-index --fsmonitor &&
309309
git ls-files -f >expect &&
310-
test-dump-fsmonitor >&2 && echo &&
310+
test-tool dump-fsmonitor >&2 && echo &&
311311
git update-index --fsmonitor --split-index &&
312-
test-dump-fsmonitor >&2 && echo &&
312+
test-tool dump-fsmonitor >&2 && echo &&
313313
git ls-files -f >actual &&
314314
test_cmp expect actual
315315
'

0 commit comments

Comments
 (0)