From 5babb5bdb3d09ee670f7e3a3ae596eb2f1d02268 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 7 Sep 2016 08:10:41 +0200 Subject: [PATCH] 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 Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- t/t6026-merge-attr.sh | 2 ++ 1 file changed, 2 insertions(+) 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" && -- GitLab