From mboxrd@z Thu Jan 1 00:00:00 1970 From: cgit at cryptocrack.de (Lukas Fleischer) Date: Mon, 8 Apr 2013 20:47:14 +0200 Subject: [PATCH 2/3] t0107: Skip ZIP tests if unzip(1) isn't available In-Reply-To: <20130408182632.GW2222@serenity.lan> References: <1365445100-3877-1-git-send-email-cgit@cryptocrack.de> <1365445100-3877-2-git-send-email-cgit@cryptocrack.de> <20130408182632.GW2222@serenity.lan> Message-ID: <20130408184714.GA8137@blizzard> On Mon, Apr 08, 2013 at 07:26:32PM +0100, John Keeping wrote: > On Mon, Apr 08, 2013 at 08:18:19PM +0200, Lukas Fleischer wrote: > > Skip tests using unzip(1) if the binary isn't available instead of > > erroring out. > > > > Signed-off-by: Lukas Fleischer > > --- > > tests/t0107-snapshot.sh | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/tests/t0107-snapshot.sh b/tests/t0107-snapshot.sh > > index 132d2e9..14ea62d 100755 > > --- a/tests/t0107-snapshot.sh > > +++ b/tests/t0107-snapshot.sh > > @@ -55,6 +55,13 @@ run_test 'strip off the header lines (zip)' ' > > tail -n +6 trash/tmp >trash/master.zip > > ' > > > > +unzip=`which unzip` > > +test -n "$unzip" || { > > + echo "Skipping tests: unzip not found" > > + tests_done > > Is this based on the jk/use-git-test-suite? If so can we use skip_all > and test_done instead of tests_done? > > I have a WIP series that does the global replacements of > s/tests_done/test_done/ and s/run_test/test_expect_success/. It would be great if you could submit that patch and merge into jk/use-git-test-suite first, so that we won't get a conflict... > > > + exit > > +} > > + > > run_test 'verify zip format' ' > > unzip -t trash/master.zip > > ' > > -- > > 1.8.2.675.gda3bb24.dirty