threads / patch / 35174

patch, 2 partst5570: Update for symref capability

Subject: [PATCH 1/2] t5570: Update for symref capability

## tl;dr

3 messages between Oct 21, 2013 and Oct 21, 2013. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Brian Gernhardt· Oct 21, 2013, 17:54 UTC · lore

git-daemon now uses the symref capability to send the correct HEAD reference, so the test for that in t5570 now passes.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---
 t/t5570-git-daemon.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5570-git-daemon.sh +1 −1
diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh
index f01edff..dc55e51 100755
--- a/t/t5570-git-daemon.sh
+++ b/t/t5570-git-daemon.sh
@@ -37,7 +37,7 @@ test_expect_success 'fetch changes via git protocol' '
 	test_cmp file clone/file
 '
 
-test_expect_failure 'remote detects correct HEAD' '
+test_expect_success 'remote detects correct HEAD' '
 	git push public master:other &&
 	(cd clone &&
 	 git remote set-head -d origin &&
-- 
1.8.3.4 (Apple Git-47)
Brian Gernhardt· Oct 21, 2013, 17:54 UTC · re: Brian Gernhardt · lore

[PATCH 2/2] t5570: Update for clone-progress-to-stderr branch

git clone now reports its progress to standard error, which throws off t5570. Using test_i18ngrep instead of test_cmp allows the test to be more flexible by only looking for the expected error and ignoring any other output from the program.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---
 t/t5570-git-daemon.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Show changes to t/t5570-git-daemon.sh +1 −2
diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh
index dc55e51..e061468 100755
--- a/t/t5570-git-daemon.sh
+++ b/t/t5570-git-daemon.sh
@@ -122,8 +122,7 @@ test_remote_error()
 	fi
 
 	test_must_fail git "$cmd" "$GIT_DAEMON_URL/$repo" "$@" 2>output &&
-	echo "fatal: remote error: $msg: /$repo" >expect &&
-	test_cmp expect output
+	test_i18ngrep "fatal: remote error: $msg: /$repo" output &&
 	ret=$?
 	chmod +x "$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git"
 	(exit $ret)
-- 
1.8.3.4 (Apple Git-47)
Jeff King· Oct 21, 2013, 18:41 UTC · re: Brian Gernhardt · lore

Re: [PATCH 2/2] t5570: Update for clone-progress-to-stderr branch

On Mon, Oct 21, 2013 at 01:54:12PM -0400, Brian Gernhardt wrote:
> git clone now reports its progress to standard error, which throws off
> t5570.  Using test_i18ngrep instead of test_cmp allows the test to be
> more flexible by only looking for the expected error and ignoring any
> other output from the program.

Thanks, this is due to my 68b939b. I dealt with the fallout elsewhere in the test suite, but I did not run with GIT_TEST_GIT_DAEMON set (and I do not think Junio does, either). I'll start doing so.

I already have GIT_TEST_HTTPD set, and after a quick grep I don't think I am missing any others (I do skip the svn, cvs, and p4 tests, though, as I do not have them installed).

-Peff

← back to recent threads