public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org, Robert Allan Zeh <robert.a.zeh@gmail•com>
Subject: [PATCH] t9143: do not fail if Compress::Zlib is missing
Date: Sun, 26 Jul 2009 03:01:52 -0700	[thread overview]
Message-ID: <20090726100152.GA25775@dcvr.yhbt.net> (raw)
In-Reply-To: <7v3a8jsvyu.fsf@alter.siamese.dyndns.org>

"git svn gc" will not compress unhandled.log files if
Compress::Zlib is missing.  However, leftover index files should
always be removed, so add a test for this behavior as well.

Signed-off-by: Eric Wong <normalperson@yhbt•net>
---
  Junio C Hamano <gitster@pobox•com> wrote:
  > Eric Wong <normalperson@yhbt•net> writes:
  > 
  > >   # I thought I had pushed this out earlier:
  > >   Robert Allan Zeh (1):
  > >         git svn: add gc command
  > 
  > Note that with this commit, the test fails needlessly if Compress::Zlib is
  > not found, even though otherwise "svn gc" succeeds (for some definition of
  > "success")..

  Oops, this test completely slipped my mind even though I caught the
  issue in the original code.  Pushed out to git://git.bogomips.org/git-svn

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

diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh
index aaa3af0..f2ba2d1 100755
--- a/t/t9143-git-svn-gc.sh
+++ b/t/t9143-git-svn-gc.sh
@@ -31,11 +31,20 @@ test_expect_success 'make backup copy of unhandled.log' '
 	 cp .git/svn/git-svn/unhandled.log tmp
 	'
 
+test_expect_success 'create leftover index' '> .git/svn/git-svn/index'
+
 test_expect_success 'git svn gc runs' 'git svn gc'
 
-test_expect_success 'git svn gc produces a valid gzip file' '
-	 gunzip .git/svn/git-svn/unhandled.log.gz
-	'
+test_expect_success 'git svn index removed' '! test -f .git/svn/git-svn/index'
+
+if perl -MCompress::Zlib -e 0 2>/dev/null
+then
+	test_expect_success 'git svn gc produces a valid gzip file' '
+		 gunzip .git/svn/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' '
 	 test_cmp .git/svn/git-svn/unhandled.log tmp/unhandled.log
-- 
Eric Wong

  reply	other threads:[~2009-07-26 10:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23  6:40 [ANNOUNCE] GIT 1.6.4-rc2 Junio C Hamano
2009-07-23 16:32 ` Tony Finch
2009-07-24  9:38 ` Eric Wong
2009-07-24 17:49   ` Junio C Hamano
2009-07-25 10:38     ` Eric Wong
2009-07-25 11:10       ` [PATCH 2/2] git svn: the branch command no longer needs the full path Eric Wong
2009-07-26  8:13         ` Junio C Hamano
2009-07-26 10:01           ` Eric Wong [this message]
2009-07-25 13:39       ` [ANNOUNCE] GIT 1.6.4-rc2 Mattias Nissler
2009-07-25 19:22         ` Eric Wong
2009-07-25 20:16           ` Mattias Nissler
2009-07-25 20:57             ` [PATCH] git svn: make minimize URL more reliable over http(s) Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090726100152.GA25775@dcvr.yhbt.net \
    --to=normalperson@yhbt$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=robert.a.zeh@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox