git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t6026-merge-attr: wait for process to release trash directory
@ 2016-09-05 19:03 Johannes Sixt
  2016-09-06  7:25 ` Johannes Schindelin
  2016-09-06  7:27 ` [PATCH] t6026-merge-attr: wait for process to release trash directory Jeff King
  0 siblings, 2 replies; 11+ messages in thread
From: Johannes Sixt @ 2016-09-05 19:03 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Git Mailing List

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. Insert a delay to
give the hook time to go away.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t6026-merge-attr.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh
index dd8f88d..2c5b138 100755
--- a/t/t6026-merge-attr.sh
+++ b/t/t6026-merge-attr.sh
@@ -191,7 +191,10 @@ test_expect_success 'custom merge does not lock index' '
 		"* merge=ours" "text merge=sleep-one-second" &&
 	test_config merge.ours.driver true &&
 	test_config merge.sleep-one-second.driver ./sleep-one-second.sh &&
-	git merge master
+	git merge master &&
+	# the trash directory cannot be removed on Windows until the hook
+	# does not occupy it for its CWD anymore; wait for it to quit:
+	sleep 1
 '
 
 test_done
-- 
2.10.0.85.gea34e30


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-09-09  9:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 19:03 [PATCH] t6026-merge-attr: wait for process to release trash directory Johannes Sixt
2016-09-06  7:25 ` Johannes Schindelin
2016-09-07  6:10   ` [PATCH v2] t6026-merge-attr: clean up background process at end of test case Johannes Sixt
2016-09-07 11:35     ` Johannes Schindelin
2016-09-06  7:27 ` [PATCH] t6026-merge-attr: wait for process to release trash directory Jeff King
2016-09-07 18:39   ` Junio C Hamano
2016-09-07 19:00     ` Jeff King
2016-09-07 19:59       ` Junio C Hamano
2016-09-08  8:05       ` Johannes Schindelin
2016-09-08  8:27         ` Jeff King
2016-09-09  9:58           ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).