Skip to content

Commit 5babb5b

Browse files
j6tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6ebdac1 commit 5babb5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/t6026-merge-attr.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ test_expect_success 'custom merge does not lock index' '
185185
git reset --hard anchor &&
186186
write_script sleep-one-second.sh <<-\EOF &&
187187
sleep 1 &
188+
echo $! >sleep.pid
188189
EOF
190+
test_when_finished "kill \$(cat sleep.pid)" &&
189191
190192
test_write_lines >.gitattributes \
191193
"* merge=ours" "text merge=sleep-one-second" &&

0 commit comments

Comments
 (0)