提交 5babb5bd 编写于 作者: J Johannes Sixt 提交者: Junio C Hamano

t6026-merge-attr: clean up background process at end of test case

The process spawned in the hook uses the test's trash directory as CWD.
As long as it is alive, the directory cannot be removed on Windows.
Although the test succeeds, the 'test_done' that follows produces an
error message and leaves the trash directory around. Kill the process
before the test case advances.
Helped-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 6ebdac1b
...@@ -185,7 +185,9 @@ test_expect_success 'custom merge does not lock index' ' ...@@ -185,7 +185,9 @@ test_expect_success 'custom merge does not lock index' '
git reset --hard anchor && git reset --hard anchor &&
write_script sleep-one-second.sh <<-\EOF && write_script sleep-one-second.sh <<-\EOF &&
sleep 1 & sleep 1 &
echo $! >sleep.pid
EOF EOF
test_when_finished "kill \$(cat sleep.pid)" &&
test_write_lines >.gitattributes \ test_write_lines >.gitattributes \
"* merge=ours" "text merge=sleep-one-second" && "* merge=ours" "text merge=sleep-one-second" &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册