Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/helper: merge test-dump-fsmonitor into test-tool
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 9 Sep 2018 17:36:30 +0000
(19:36 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 11 Sep 2018 17:54:19 +0000
(10:54 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
t/helper/test-dump-fsmonitor.c
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
t/helper/test-tool.h
patch
|
blob
|
history
t/t7519-status-fsmonitor.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
2f17c78
)
diff --git
a/Makefile
b/Makefile
index 1a8a7cb82dbff75124ecf25852af632bd4620586..ea7454632dea99e9b00e7d5ccaee154ba8142be8 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-709,6
+709,7
@@
TEST_BUILTINS_OBJS += test-date.o
TEST_BUILTINS_OBJS += test-delta.o
TEST_BUILTINS_OBJS += test-drop-caches.o
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
TEST_BUILTINS_OBJS += test-delta.o
TEST_BUILTINS_OBJS += test-drop-caches.o
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
+TEST_BUILTINS_OBJS += test-dump-fsmonitor.o
TEST_BUILTINS_OBJS += test-dump-split-index.o
TEST_BUILTINS_OBJS += test-dump-untracked-cache.o
TEST_BUILTINS_OBJS += test-example-decorate.o
TEST_BUILTINS_OBJS += test-dump-split-index.o
TEST_BUILTINS_OBJS += test-dump-untracked-cache.o
TEST_BUILTINS_OBJS += test-example-decorate.o
@@
-743,7
+744,6
@@
TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
TEST_BUILTINS_OBJS += test-wildmatch.o
TEST_BUILTINS_OBJS += test-write-cache.o
TEST_BUILTINS_OBJS += test-wildmatch.o
TEST_BUILTINS_OBJS += test-write-cache.o
-TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-svn-fe
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-svn-fe
diff --git
a/t/helper/test-dump-fsmonitor.c
b/t/helper/test-dump-fsmonitor.c
index ad452707e88b609d4d39e6f12bff9f73df2271c7..08e3684aff223670fb0786d80426d18bb8800a44 100644
(file)
--- a/
t/helper/test-dump-fsmonitor.c
+++ b/
t/helper/test-dump-fsmonitor.c
@@
-1,6
+1,7
@@
+#include "test-tool.h"
#include "cache.h"
#include "cache.h"
-int cmd_
main
(int ac, const char **av)
+int cmd_
_dump_fsmonitor
(int ac, const char **av)
{
struct index_state *istate = &the_index;
int i;
{
struct index_state *istate = &the_index;
int i;
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index 9cc21024e9dafd398658701c0a8920e9fd3683d7..6261c2fda030ae89674cc0cc15f3167fdc0c87d6 100644
(file)
--- a/
t/helper/test-tool.c
+++ b/
t/helper/test-tool.c
@@
-14,6
+14,7
@@
static struct test_cmd cmds[] = {
{ "delta", cmd__delta },
{ "drop-caches", cmd__drop_caches },
{ "dump-cache-tree", cmd__dump_cache_tree },
{ "delta", cmd__delta },
{ "drop-caches", cmd__drop_caches },
{ "dump-cache-tree", cmd__dump_cache_tree },
+ { "dump-fsmonitor", cmd__dump_fsmonitor },
{ "dump-split-index", cmd__dump_split_index },
{ "dump-untracked-cache", cmd__dump_untracked_cache },
{ "example-decorate", cmd__example_decorate },
{ "dump-split-index", cmd__dump_split_index },
{ "dump-untracked-cache", cmd__dump_untracked_cache },
{ "example-decorate", cmd__example_decorate },
diff --git
a/t/helper/test-tool.h
b/t/helper/test-tool.h
index 527722f4b0a456fc7dbce6cdb031c766cb1b5a02..38da025511153139c6b8f5fcf954920843bbeda1 100644
(file)
--- a/
t/helper/test-tool.h
+++ b/
t/helper/test-tool.h
@@
-10,6
+10,7
@@
int cmd__date(int argc, const char **argv);
int cmd__delta(int argc, const char **argv);
int cmd__drop_caches(int argc, const char **argv);
int cmd__dump_cache_tree(int argc, const char **argv);
int cmd__delta(int argc, const char **argv);
int cmd__drop_caches(int argc, const char **argv);
int cmd__dump_cache_tree(int argc, const char **argv);
+int cmd__dump_fsmonitor(int argc, const char **argv);
int cmd__dump_split_index(int argc, const char **argv);
int cmd__dump_untracked_cache(int argc, const char **argv);
int cmd__example_decorate(int argc, const char **argv);
int cmd__dump_split_index(int argc, const char **argv);
int cmd__dump_untracked_cache(int argc, const char **argv);
int cmd__example_decorate(int argc, const char **argv);
diff --git
a/t/t7519-status-fsmonitor.sh
b/t/t7519-status-fsmonitor.sh
index 603d27789b8e163ade3f1633a04492c10e595318..8384ad258c359572d83bb38fd69f61ec6fe612e7 100755
(executable)
--- a/
t/t7519-status-fsmonitor.sh
+++ b/
t/t7519-status-fsmonitor.sh
@@
-84,21
+84,21
@@
test_expect_success 'setup' '
# test that the fsmonitor extension is off by default
test_expect_success 'fsmonitor extension is off by default' '
# test that the fsmonitor extension is off by default
test_expect_success 'fsmonitor extension is off by default' '
- test-dump-fsmonitor >actual &&
+ test-
tool
dump-fsmonitor >actual &&
grep "^no fsmonitor" actual
'
# test that "update-index --fsmonitor" adds the fsmonitor extension
test_expect_success 'update-index --fsmonitor" adds the fsmonitor extension' '
git update-index --fsmonitor &&
grep "^no fsmonitor" actual
'
# test that "update-index --fsmonitor" adds the fsmonitor extension
test_expect_success 'update-index --fsmonitor" adds the fsmonitor extension' '
git update-index --fsmonitor &&
- test-dump-fsmonitor >actual &&
+ test-
tool
dump-fsmonitor >actual &&
grep "^fsmonitor last update" actual
'
# test that "update-index --no-fsmonitor" removes the fsmonitor extension
test_expect_success 'update-index --no-fsmonitor" removes the fsmonitor extension' '
git update-index --no-fsmonitor &&
grep "^fsmonitor last update" actual
'
# test that "update-index --no-fsmonitor" removes the fsmonitor extension
test_expect_success 'update-index --no-fsmonitor" removes the fsmonitor extension' '
git update-index --no-fsmonitor &&
- test-dump-fsmonitor >actual &&
+ test-
tool
dump-fsmonitor >actual &&
grep "^no fsmonitor" actual
'
grep "^no fsmonitor" actual
'
@@
-307,9
+307,9
@@
test_expect_success 'splitting the index results in the same state' '
dirty_repo &&
git update-index --fsmonitor &&
git ls-files -f >expect &&
dirty_repo &&
git update-index --fsmonitor &&
git ls-files -f >expect &&
- test-dump-fsmonitor >&2 && echo &&
+ test-
tool
dump-fsmonitor >&2 && echo &&
git update-index --fsmonitor --split-index &&
git update-index --fsmonitor --split-index &&
- test-dump-fsmonitor >&2 && echo &&
+ test-
tool
dump-fsmonitor >&2 && echo &&
git ls-files -f >actual &&
test_cmp expect actual
'
git ls-files -f >actual &&
test_cmp expect actual
'