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>
Johannes Sixt committed
Sep 7, 2016 at 08:10 UTC
5babb5bdb3d09ee670f7e3a3ae596eb2f1d02268
1 file changed
+2
t/t6026-merge-attr.sh
+2
@@ -185,7 +185,9 @@ test_expect_success 'custom merge does not lock index' '
185
git reset --hard anchor &&
186
write_script sleep-one-second.sh <<-\EOF &&
187
sleep 1 &
188
+ echo $! >sleep.pid
189
EOF
190
+ test_when_finished "kill \$(cat sleep.pid)" &&
191
192
test_write_lines >.gitattributes \
193
"* merge=ours" "text merge=sleep-one-second" &&