t/helper: merge test-subprocess into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Mar 24, 2018 at 08:45 UTC 112edd6abe29a51cbe53f6761d35443cfcb73cde
5 files changed +6 -3
Makefile
+1 -1
@@ -683,6 +683,7 @@ TEST_BUILTINS_OBJS += test-sigchain.o
683 TEST_BUILTINS_OBJS += test-strcmp-offset.o
684 TEST_BUILTINS_OBJS += test-string-list.o
685 TEST_BUILTINS_OBJS += test-submodule-config.o
686 +TEST_BUILTINS_OBJS += test-subprocess.o
687
688 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
689 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -690,7 +691,6 @@ TEST_PROGRAMS_NEED_X += test-fake-ssh
691 TEST_PROGRAMS_NEED_X += test-line-buffer
692 TEST_PROGRAMS_NEED_X += test-parse-options
693 TEST_PROGRAMS_NEED_X += test-write-cache
693 -TEST_PROGRAMS_NEED_X += test-subprocess
694 TEST_PROGRAMS_NEED_X += test-svn-fe
695 TEST_PROGRAMS_NEED_X += test-tool
696 TEST_PROGRAMS_NEED_X += test-urlmatch-normalization
t/helper/test-subprocess.c
+2 -1
@@ -1,7 +1,8 @@
1 +#include "test-tool.h"
2 #include "cache.h"
3 #include "run-command.h"
4
4 -int cmd_main(int argc, const char **argv)
5 +int cmd__subprocess(int argc, const char **argv)
6 {
7 struct child_process cp = CHILD_PROCESS_INIT;
8 int nogit = 0;
t/helper/test-tool.c
+1
@@ -38,6 +38,7 @@ static struct test_cmd cmds[] = {
38 { "strcmp-offset", cmd__strcmp_offset },
39 { "string-list", cmd__string_list },
40 { "submodule-config", cmd__submodule_config },
41 + { "subprocess", cmd__subprocess },
42 };
43
44 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h
+1
@@ -32,5 +32,6 @@ int cmd__sigchain(int argc, const char **argv);
32 int cmd__strcmp_offset(int argc, const char **argv);
33 int cmd__string_list(int argc, const char **argv);
34 int cmd__submodule_config(int argc, const char **argv);
35 +int cmd__subprocess(int argc, const char **argv);
36
37 #endif
t/t1501-work-tree.sh
+1 -1
@@ -341,7 +341,7 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
341
342 test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
343 GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
344 - test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
344 + test-tool subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
345 echo "$(pwd)/repo.git/work" >expected &&
346 test_cmp expected actual
347 '