Git development
 help / color / mirror / Atom feed
* t5501-old-fetch-and-upload.sh fails with NO_PYTHON=1
@ 2006-04-11 17:05 Dennis Stosberg
  2006-04-11 18:06 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Dennis Stosberg @ 2006-04-11 17:05 UTC (permalink / raw)
  To: git

Hello,

t/t5501-old-fetch-and-upload.sh fails on Solaris 9 with NO_PYTHON=1.
The test doesn't work correctly on Linux with NO_PYTHON=1, too, but it
doesn't cause a failure there.

When NO_PYTHON=1 is set, t/Makefile passes "--no-python" to the test as
an argument.  That causes the $list variable to be set to "--no-python"
instead of "fetch upload".  Since that string does not identify a
program to be tested, $pgm remains unset.

On Linux the return code of "which $pgm" is 1 in that case, which
causes the test to do nothing and exit without failure.  In contrast,
the return code of "which" without any argument is 0 on Solaris, so
the test is being run and fails.

I have attached a simple fix, but is this test still useful at all?

Regards,
Dennis

diff --git a/t/t5501-old-fetch-and-upload.sh b/t/t5501-old-fetch-and-upload.sh
index 596c88b..df69d97 100755
--- a/t/t5501-old-fetch-and-upload.sh
+++ b/t/t5501-old-fetch-and-upload.sh
@@ -13,10 +13,11 @@ tmp=`pwd`/.tmp$$
 
 retval=0
 
-if [ -z "$1" ]; then
+tests=`echo "$@"| sed -e 's/--[a-zA-Z\-]*//g'`
+if [ -z "$tests" ]; then
 	list="fetch upload"
 else
-	list="$@"
+	list="$tests"
 fi
 
 for i in $list; do

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-11 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 17:05 t5501-old-fetch-and-upload.sh fails with NO_PYTHON=1 Dennis Stosberg
2006-04-11 18:06 ` Junio C Hamano
2006-04-11 21:31   ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox