git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1501: fix test with split index
@ 2015-03-24 17:35 Thomas Gummerer
  2015-03-24 17:58 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gummerer @ 2015-03-24 17:35 UTC (permalink / raw)
  To: git
  Cc: Thomas Gummerer, Junio C Hamano, Nguyễn Thái Ngọc Duy

t1501-worktree.sh does not copy the shared index in the "relative
$GIT_WORK_TREE and git subprocesses" test, which makes the test fail
when GIT_TEST_SPLIT_INDEX is set.  Copy the shared index as well in
order to fix this.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---

This applies on top of nd/multiple-work-trees.  Sorry for not catching it
earlier, but I haven't tried to run the test-suite for the next branch
then, where this appears.

 t/t1501-worktree.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 4df7a2f..ce5c654 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' '
 	mkdir work &&
 	mkdir -p repo.git/repos/foo &&
 	cp repo.git/HEAD repo.git/index repo.git/repos/foo &&
+	( cp repo.git/sharedindex.* repo.git/repos/foo 2>/dev/null || : ) &&
 	sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE
 '
 
-- 
2.1.0.264.g0463184.dirty

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

* Re: [PATCH] t1501: fix test with split index
  2015-03-24 17:35 [PATCH] t1501: fix test with split index Thomas Gummerer
@ 2015-03-24 17:58 ` Junio C Hamano
  2015-03-24 19:21   ` [PATCH v2] " Thomas Gummerer
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2015-03-24 17:58 UTC (permalink / raw)
  To: Thomas Gummerer; +Cc: git, Nguyễn Thái Ngọc Duy

Thomas Gummerer <t.gummerer@gmail.com> writes:

> t1501-worktree.sh does not copy the shared index in the "relative
> $GIT_WORK_TREE and git subprocesses" test, which makes the test fail
> when GIT_TEST_SPLIT_INDEX is set.  Copy the shared index as well in
> order to fix this.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> ---
>
> This applies on top of nd/multiple-work-trees.  Sorry for not catching it
> earlier, but I haven't tried to run the test-suite for the next branch
> then, where this appears.
>
>  t/t1501-worktree.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
> index 4df7a2f..ce5c654 100755
> --- a/t/t1501-worktree.sh
> +++ b/t/t1501-worktree.sh
> @@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' '
>  	mkdir work &&
>  	mkdir -p repo.git/repos/foo &&
>  	cp repo.git/HEAD repo.git/index repo.git/repos/foo &&
> +	( cp repo.git/sharedindex.* repo.git/repos/foo 2>/dev/null || : ) &&

Is this a good place to use "test-might-fail", e.g.

	test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&

or something?

>  	sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE
>  '

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

* [PATCH v2] t1501: fix test with split index
  2015-03-24 17:58 ` Junio C Hamano
@ 2015-03-24 19:21   ` Thomas Gummerer
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gummerer @ 2015-03-24 19:21 UTC (permalink / raw)
  To: git
  Cc: Thomas Gummerer, Junio C Hamano, Nguyễn Thái Ngọc Duy

t1501-worktree.sh does not copy the shared index in the "relative
$GIT_WORK_TREE and git subprocesses" test, which makes the test fail
when GIT_TEST_SPLIT_INDEX is set.  Copy the shared index as well in
order to fix this.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---

> Is this a good place to use "test-might-fail", e.g.
>
>        test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&
>
> or something?

Yeah that makes sense, thanks.

 t/t1501-worktree.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 4df7a2f..cc5b870 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' '
 	mkdir work &&
 	mkdir -p repo.git/repos/foo &&
 	cp repo.git/HEAD repo.git/index repo.git/repos/foo &&
+	test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&
 	sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE
 '
 
-- 
2.1.0.264.g0463184.dirty

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

end of thread, other threads:[~2015-03-24 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 17:35 [PATCH] t1501: fix test with split index Thomas Gummerer
2015-03-24 17:58 ` Junio C Hamano
2015-03-24 19:21   ` [PATCH v2] " Thomas Gummerer

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).