summaryrefslogtreecommitdiff
path: root/t/helper/test-tool.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2021-03-22 10:29:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-22 18:52:54 (GMT)
commit36a7eb68760b7a45ce6b16be300dd04fbe9bd029 (patch)
treefaa3ac8ec84ac328dc09ebd7a127a83ab266d2a9 /t/helper/test-tool.c
parent7cd5dbcaba44914c07a51377e75c4e8bbe31f319 (diff)
downloadgit-36a7eb68760b7a45ce6b16be300dd04fbe9bd029.zip
git-36a7eb68760b7a45ce6b16be300dd04fbe9bd029.tar.gz
git-36a7eb68760b7a45ce6b16be300dd04fbe9bd029.tar.bz2
t0052: add simple-ipc tests and t/helper/test-simple-ipc tool
Create t0052-simple-ipc.sh with unit tests for the "simple-ipc" mechanism. Create t/helper/test-simple-ipc test tool to exercise the "simple-ipc" functions. When the tool is invoked with "run-daemon", it runs a server to listen for "simple-ipc" connections on a test socket or named pipe and responds to a set of commands to exercise/stress the communication setup. When the tool is invoked with "start-daemon", it spawns a "run-daemon" command in the background and waits for the server to become ready before exiting. (This helps make unit tests in t0052 more predictable and avoids the need for arbitrary sleeps in the test script.) The tool also has a series of client "send" commands to send commands and data to a server instance. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-tool.c')
-rw-r--r--t/helper/test-tool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 9d6d14d..a409655 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -64,6 +64,7 @@ static struct test_cmd cmds[] = {
{ "sha1", cmd__sha1 },
{ "sha256", cmd__sha256 },
{ "sigchain", cmd__sigchain },
+ { "simple-ipc", cmd__simple_ipc },
{ "strcmp-offset", cmd__strcmp_offset },
{ "string-list", cmd__string_list },
{ "submodule-config", cmd__submodule_config },