From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: [PATCH 2/3] t0107: Skip ZIP tests if unzip(1) isn't available
Date: Mon, 8 Apr 2013 20:18:19 +0200 [thread overview]
Message-ID: <1365445100-3877-2-git-send-email-cgit@cryptocrack.de> (raw)
In-Reply-To: <1365445100-3877-1-git-send-email-cgit@cryptocrack.de>
Skip tests using unzip(1) if the binary isn't available instead of
erroring out.
Signed-off-by: Lukas Fleischer <cgit at cryptocrack.de>
---
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
+ exit
+}
+
run_test 'verify zip format' '
unzip -t trash/master.zip
'
--
1.8.2.675.gda3bb24.dirty
next prev parent reply other threads:[~2013-04-08 18:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 18:18 [PATCH 1/3] tests/: Do not use `sed -i` cgit
2013-04-08 18:18 ` cgit [this message]
2013-04-08 18:26 ` [PATCH 2/3] t0107: Skip ZIP tests if unzip(1) isn't available john
2013-04-08 18:41 ` Jason
2013-04-08 18:47 ` cgit
2013-04-08 18:49 ` john
2013-04-08 22:19 ` Jason
2013-04-08 22:23 ` john
2013-04-08 20:57 ` Jason
2013-04-08 18:18 ` [PATCH 3/3] t0107: Use `tar -z` for gzip'ed archives cgit
2013-04-08 22:15 ` Jason
2013-04-08 18:24 ` [PATCH 1/3] tests/: Do not use `sed -i` john
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=1365445100-3877-2-git-send-email-cgit@cryptocrack.de \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).