git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t5000-tar-tree.sh failing

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Dec 21, 2006, 14:17 UTC
Message-ID
<9A725DAA-FAA8-4779-A73D-ED117CC068C1@silverinsanity.com>
In-Reply-To
<Pine.LNX.4.63.0612211458360.19693@wbgn013.biozentrum.uni-wuerzburg.de>
On Dec 21, 2006, at 9:00 AM, Johannes Schindelin wrote:
Show 10 quoted lines
>
> 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
Previous: Johannes SchindelinNext: Uwe Kleine-Koenig
Message 3 of 6 in “t5000-tar-tree.sh failing”
  1. Uwe Kleine-KönigDec 21, 2006
  2. Johannes SchindelinDec 21, 2006
  3. Brian GernhardtDec 21, 2006
  4. Uwe Kleine-KoenigDec 21, 2006
  5. Brian GernhardtDec 21, 2006
  6. Johannes SchindelinDec 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.