From: Brian Gernhardt Date: Thu, 21 Dec 2006 14:17:51 GMT Subject: Re: t5000-tar-tree.sh failing Message-ID: <9A725DAA-FAA8-4779-A73D-ED117CC068C1@silverinsanity.com> In-Reply-To: On Dec 21, 2006, at 9:00 AM, Johannes Schindelin wrote: > > Why not enclose the tests in a > > if unzip -h >/dev/null 2>/dev/null; then > > # all these tests > > fi > > Hmm? Several other test frameworks provide a "skip" method to indicate why we've skipped something. We could do something similar... if skip 'unzip -h' 'tests need unzip'; then # unzip tests fi skip() { # Have not checked to see if this is anything resembling working code if eval $1 > /dev/null 2>&1; then true else echo "* skipping tests: $2" 1>&2 false fi } Mostly so that skipped tests are obvious, provide a reason, and have a standardized display format. Again, too busy in actual work to try to do this myself right now, but might hack at it this afternoon if nobody else (hopefully someone more fluent in shell than I am) does. ~~ Brian