# t5501-old-fetch-and-upload.sh fails with NO_PYTHON=1

3 messages from 2006-04-11 to 2006-04-11. Participants: Dennis Stosberg, Junio C Hamano, Johannes Schindelin.
Thread: https://gitlist.dev/t/3850

## Dennis Stosberg, 2006-04-11 17:05

Subject: t5501-old-fetch-and-upload.sh fails with NO_PYTHON=1
Message-ID: <20060411170508.G14ba7e47@leonov.stosberg.net>
URL: https://gitlist.dev/e/20060411170508.G14ba7e47%40leonov.stosberg.net

```
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

```

## Junio C Hamano, 2006-04-11 18:06

Subject: Re: t5501-old-fetch-and-upload.sh fails with NO_PYTHON=1
Message-ID: <7vlkuc56m9.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vlkuc56m9.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060411170508.G14ba7e47@leonov.stosberg.net>

```
Dennis Stosberg <dennis@stosberg.net> writes:

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

Thanks.  I am inclined to say that when we need the "make sure
this updated send-pack works with older receive-pack and vice
versa" tests the next time, the framework to call the
counterpart program from different vintage might be reusable but
what the test tries to test would be different, so keeping this
particular test would be somewhat useful as reference and
perhaps a starting point for such new test, but otherwise not
very much.  And for that kind of usage, "the Net never forgets".

I'd vote for its removal.  Thoughts?

```

## Johannes Schindelin, 2006-04-11 21:31

Subject: Re: t5501-old-fetch-and-upload.sh fails with NO_PYTHON=1
Message-ID: <Pine.LNX.4.63.0604112329030.26779@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0604112329030.26779%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7vlkuc56m9.fsf@assigned-by-dhcp.cox.net>

```
Hi,

On Tue, 11 Apr 2006, Junio C Hamano wrote:

> [...] so keeping this particular test would be somewhat useful as 
> reference and perhaps a starting point for such new test, but otherwise 
> not very much.  And for that kind of usage, "the Net never forgets".

Not only that. Git itself never forgets. "git-cat-file blob 596c88b" will 
probably work virtually forever.

> I'd vote for its removal.  Thoughts?

Yeah.

Ciao,
Dscho

```
