summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <j6t@kdbg.org>2016-09-07 08:10:41 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-07 11:40:22 -0700
commit5babb5bdb3d09ee670f7e3a3ae596eb2f1d02268 (patch)
treefd2371d2b1b8d7de6905dd197d14f8c6d6f0dad2
parentGit 2.10 (diff)
downloadtgif-5babb5bdb3d09ee670f7e3a3ae596eb2f1d02268.tar.xz
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: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t6026-merge-attr.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh
index dd8f88d187..7a6e33e673 100755
--- a/t/t6026-merge-attr.sh
+++ b/t/t6026-merge-attr.sh
@@ -185,7 +185,9 @@ test_expect_success 'custom merge does not lock index' '
git reset --hard anchor &&
write_script sleep-one-second.sh <<-\EOF &&
sleep 1 &
+ echo $! >sleep.pid
EOF
+ test_when_finished "kill \$(cat sleep.pid)" &&
test_write_lines >.gitattributes \
"* merge=ours" "text merge=sleep-one-second" &&