git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t9143: do not fail when unhandled.log.gz is not created
@ 2010-12-04 11:37 Torsten Bögershausen
  2010-12-06 19:23 ` Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Torsten Bögershausen @ 2010-12-04 11:37 UTC (permalink / raw)
  To: normalperson, git, gitster; +Cc: tboegi

Commit df73af5f66 is does not let the test case fail,
when Compress::Zlib is missing.
But:
On a MacOS X 10.6 system with missing Compress::Zlib
using svn version 1.6.5 (r38866) the gz file is created.
Solution:
Check for the existance of the unhandled.log.gz file.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
  t/t9143-git-svn-gc.sh |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh
index 337ea59..8a95d78 100755
--- a/t/t9143-git-svn-gc.sh
+++ b/t/t9143-git-svn-gc.sh
@@ -37,7 +37,7 @@ test_expect_success 'git svn gc runs' 'git svn gc'
   test_expect_success 'git svn index removed' '! test -f 
.git/svn/refs/remotes/git-svn/index'
  -if perl -MCompress::Zlib -e 0 2>/dev/null
+if test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz
  then
  	test_expect_success 'git svn gc produces a valid gzip file' '
  		 gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] t9143: do not fail when unhandled.log.gz is not created
@ 2010-12-09 19:53 Torsten Bögershausen
  2010-12-09 21:31 ` Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Torsten Bögershausen @ 2010-12-09 19:53 UTC (permalink / raw)
  To: normalperson, git; +Cc: tboegi

Do not depend on internal implementation details of svn,
which right now uses perl to create a .gz file.
So this test case will even work in the future,
when svn changes its implementation.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
  t/t9143-git-svn-gc.sh |    4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh
index 337ea59..4594e1a 100755
--- a/t/t9143-git-svn-gc.sh
+++ b/t/t9143-git-svn-gc.sh
@@ -37,13 +37,11 @@ test_expect_success 'git svn gc runs' 'git svn gc'
   test_expect_success 'git svn index removed' '! test -f 
.git/svn/refs/remotes/git-svn/index'
  -if perl -MCompress::Zlib -e 0 2>/dev/null
+if test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz
  then
  	test_expect_success 'git svn gc produces a valid gzip file' '
  		 gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz
  		'
-else
-	say "# Perl Compress::Zlib unavailable, skipping gunzip test"
  fi
   test_expect_success 'git svn gc does not change unhandled.log files' '
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] t9143: do not fail when unhandled.log.gz is not created
@ 2010-12-04 11:37 Torsten Bögershausen
  0 siblings, 0 replies; 8+ messages in thread
From: Torsten Bögershausen @ 2010-12-04 11:37 UTC (permalink / raw)
  To: normalperson, git, gitster; +Cc: tboegi

t9143 fails on my system because a unhandled.log.gz is created,
even if perls Compress::Zlib is missing.
Instead of relying on svn using perl and its Zlib to generate
a .gz file, simply check if the .gz file had been created.
Now we do not depend on internal implementation details of svn.
And the code is 3% easier to understand :-)

*** BLURB HERE ***

Torsten Bögershausen (1):
   t9143: do not fail when unhandled.log.gz is not created

  t/t9143-git-svn-gc.sh |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

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

end of thread, other threads:[~2010-12-10  0:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-04 11:37 [PATCH] t9143: do not fail when unhandled.log.gz is not created Torsten Bögershausen
2010-12-06 19:23 ` Eric Wong
2010-12-08 16:25   ` Torsten Bögershausen
2010-12-08 21:41     ` Eric Wong
  -- strict thread matches above, loose matches on Subject: below --
2010-12-09 19:53 Torsten Bögershausen
2010-12-09 21:31 ` Eric Wong
2010-12-10  0:11   ` Junio C Hamano
2010-12-04 11:37 Torsten Bögershausen

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