* [PATCH 0/5] miscellaneous test suite fixes @ 2010-06-02 0:13 Brandon Casey 2010-06-02 0:13 ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Brandon Casey ` (4 more replies) 0 siblings, 5 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 0:13 UTC (permalink / raw) To: git; +Cc: gitster Identified by testing on IRIX 6.5, Solaris 5.7, and 5.10 Brandon Casey (5): t/t5800: skip if python version is older than 2.5 git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh t/t5150: remove space from sed script t/t7006: ignore return status of shell's unset builtin t/aggregate-results: accomodate systems with small max argument list length git-request-pull.sh | 2 +- t/Makefile | 4 +++- t/aggregate-results.sh | 2 +- t/t5150-request-pull.sh | 4 ++-- t/t5800-remote-helpers.sh | 4 ++-- t/t7006-pager.sh | 10 +++++----- t/test-lib.sh | 9 +++++++++ 7 files changed, 23 insertions(+), 12 deletions(-) ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey @ 2010-06-02 0:13 ` Brandon Casey 2010-06-02 6:21 ` Sverre Rabbelier 2010-06-02 6:37 ` [PATCH 1/5] " Johannes Sixt 2010-06-02 0:13 ` [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh Brandon Casey ` (3 subsequent siblings) 4 siblings, 2 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 0:13 UTC (permalink / raw) To: git; +Cc: gitster, Brandon Casey, Sverre Rabbelier From: Brandon Casey <drafnel@gmail.com> This test script depends on the git-remote-testgit python script. This python script makes use of the hashlib module which was released in python version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to test-lib.sh and check for it in t5800. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/t5800-remote-helpers.sh | 4 ++-- t/test-lib.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/t/t5800-remote-helpers.sh b/t/t5800-remote-helpers.sh index 75a0163..58f60ab 100755 --- a/t/t5800-remote-helpers.sh +++ b/t/t5800-remote-helpers.sh @@ -7,9 +7,9 @@ test_description='Test remote-helper import and export commands' . ./test-lib.sh -if ! test_have_prereq PYTHON +if ! test_have_prereq PYTHON_2_5_OR_NEWER then - say 'skipping git remote-testgit tests: requires Python support' + say 'skipping git remote-testgit tests: requires Python 2.5 or newer' test_done fi diff --git a/t/test-lib.sh b/t/test-lib.sh index 454880a..ce56e1c 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -846,6 +846,15 @@ esac test -z "$NO_PERL" && test_set_prereq PERL test -z "$NO_PYTHON" && test_set_prereq PYTHON +if test_have_prereq PYTHON && "$PYTHON_PATH" -c ' +import sys +if sys.hexversion < 0x02050000: + sys.exit(1) +' +then + test_set_prereq PYTHON_2_5_OR_NEWER +fi + # test whether the filesystem supports symbolic links ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS rm -f y -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 0:13 ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Brandon Casey @ 2010-06-02 6:21 ` Sverre Rabbelier 2010-06-02 9:33 ` Ævar Arnfjörð Bjarmason ` (4 more replies) 2010-06-02 6:37 ` [PATCH 1/5] " Johannes Sixt 1 sibling, 5 replies; 31+ messages in thread From: Sverre Rabbelier @ 2010-06-02 6:21 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster Heya, On Wed, Jun 2, 2010 at 02:13, Brandon Casey <casey@nrlssc.navy.mil> wrote: > This test script depends on the git-remote-testgit python script. This > python script makes use of the hashlib module which was released in python > version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to > test-lib.sh and check for it in t5800. Perhaps instead we can change git-remote-testgit to do: "try: import hashlib except ImportError: import ?? as hashlib " Otoh, python 2.5 has been out for a while (and is in fact only downloadable as a source-only release these days). To be exact, it was released on September 19, 2006. -- Cheers, Sverre Rabbelier ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 6:21 ` Sverre Rabbelier @ 2010-06-02 9:33 ` Ævar Arnfjörð Bjarmason 2010-06-02 14:44 ` Brandon Casey ` (3 subsequent siblings) 4 siblings, 0 replies; 31+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2010-06-02 9:33 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: Brandon Casey, git, gitster On Wed, Jun 2, 2010 at 06:21, Sverre Rabbelier <srabbelier@gmail.com> wrote: > Otoh, python 2.5 has been out for a while (and is in fact only > downloadable as a source-only release these days). To be exact, it was > released on September 19, 2006. As a trivia: most of our Perl code is still 5.6 compatible. That'd be like supporting Python 1.6 (or actually, 1.5.2, 1.6 came out half a year after Perl 5.6). Anyway, dying in the program as you suggest seems like a better idea. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 6:21 ` Sverre Rabbelier 2010-06-02 9:33 ` Ævar Arnfjörð Bjarmason @ 2010-06-02 14:44 ` Brandon Casey 2010-06-02 15:15 ` Brandon Casey 2010-06-02 23:23 ` test suite work-around for python 2.5 requirement Brandon Casey ` (2 subsequent siblings) 4 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 14:44 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: git, gitster On 06/02/2010 01:21 AM, Sverre Rabbelier wrote: > Heya, > > On Wed, Jun 2, 2010 at 02:13, Brandon Casey <casey@nrlssc.navy.mil> wrote: >> This test script depends on the git-remote-testgit python script. This >> python script makes use of the hashlib module which was released in python >> version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to >> test-lib.sh and check for it in t5800. > > Perhaps instead we can change git-remote-testgit to do: > > "try: > import hashlib > except ImportError: > import ?? as hashlib > " I can only guess at what that does. :) > Otoh, python 2.5 has been out for a while (and is in fact only > downloadable as a source-only release these days). To be exact, it was > released on September 19, 2006. That's only long in python years. :) RedHat's latest operating system still has version 2.4.3. -brandon ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 14:44 ` Brandon Casey @ 2010-06-02 15:15 ` Brandon Casey 2010-06-02 16:38 ` Sverre Rabbelier 0 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 15:15 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: git, gitster On 06/02/2010 09:44 AM, Brandon Casey wrote: > On 06/02/2010 01:21 AM, Sverre Rabbelier wrote: >> Heya, >> >> On Wed, Jun 2, 2010 at 02:13, Brandon Casey <casey@nrlssc.navy.mil> wrote: >>> This test script depends on the git-remote-testgit python script. This >>> python script makes use of the hashlib module which was released in python >>> version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to >>> test-lib.sh and check for it in t5800. >> Perhaps instead we can change git-remote-testgit to do: >> >> "try: >> import hashlib >> except ImportError: >> import ?? as hashlib >> " > > I can only guess at what that does. :) Correction, I have no idea what that does. Here's the patch: diff --git a/git-remote-testgit.py b/git-remote-testgit.py index 9253922..1371497 100644 --- a/git-remote-testgit.py +++ b/git-remote-testgit.py @@ -1,6 +1,9 @@ #!/usr/bin/env python -import hashlib +try: + import hashlib +except ImportError: + import ?? as hashlib import sys import os sys.path.insert(0, os.getenv("GITPYTHONLIB",".")) I get: File "<snip>/git-remote-testgit", line 6 import ?? as hashlib ^ SyntaxError: invalid syntax ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 15:15 ` Brandon Casey @ 2010-06-02 16:38 ` Sverre Rabbelier 2010-06-02 16:50 ` Brandon Casey 0 siblings, 1 reply; 31+ messages in thread From: Sverre Rabbelier @ 2010-06-02 16:38 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster Heya, On Wed, Jun 2, 2010 at 17:15, Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> wrote: > Here's the patch: That was not meant as a concrete suggestion :P. I meant that I did not know what package is available in 2.4.x, so substitute it on the ??'s :P. The ? does not mean anything. -- Cheers, Sverre Rabbelier ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 16:38 ` Sverre Rabbelier @ 2010-06-02 16:50 ` Brandon Casey 0 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 16:50 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: git, gitster On 06/02/2010 11:38 AM, Sverre Rabbelier wrote: > Heya, > > On Wed, Jun 2, 2010 at 17:15, Brandon Casey > <brandon.casey.ctr@nrlssc.navy.mil> wrote: >> Here's the patch: > > That was not meant as a concrete suggestion :P. I meant that I did not > know what package is available in 2.4.x, so substitute it on the ??'s > :P. The ? does not mean anything. > Ha! That shows you how much python I know! Hand, meet forehead. -b ^ permalink raw reply [flat|nested] 31+ messages in thread
* test suite work-around for python 2.5 requirement 2010-06-02 6:21 ` Sverre Rabbelier 2010-06-02 9:33 ` Ævar Arnfjörð Bjarmason 2010-06-02 14:44 ` Brandon Casey @ 2010-06-02 23:23 ` Brandon Casey 2010-06-02 23:23 ` [PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS Brandon Casey 2010-06-02 23:23 ` [PATCH 2/2] t/t5800: skip if python version is older than 2.5 Brandon Casey 4 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 23:23 UTC (permalink / raw) To: git; +Cc: gitster, srabbelier On 06/02/2010 01:21 AM, Sverre Rabbelier wrote: > Heya, > > On Wed, Jun 2, 2010 at 02:13, Brandon Casey <casey@nrlssc.navy.mil> wrote: >> This test script depends on the git-remote-testgit python script. This >> python script makes use of the hashlib module which was released in python >> version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to >> test-lib.sh and check for it in t5800. > > Perhaps instead we can change git-remote-testgit to do: > > "try: > import hashlib > except ImportError: > import ?? as hashlib > " Here's a work-around for the test suite until we figure out what ?? should be. [PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS [PATCH 2/2] t/t5800: skip if python version is older than 2.5 ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS 2010-06-02 6:21 ` Sverre Rabbelier ` (2 preceding siblings ...) 2010-06-02 23:23 ` test suite work-around for python 2.5 requirement Brandon Casey @ 2010-06-02 23:23 ` Brandon Casey 2010-06-02 23:23 ` [PATCH 2/2] t/t5800: skip if python version is older than 2.5 Brandon Casey 4 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 23:23 UTC (permalink / raw) To: git; +Cc: gitster, srabbelier, Brandon Casey From: Brandon Casey <drafnel@gmail.com> This allows the correct python to be used by the test suite. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index d5d6565..7b5de0c 100644 --- a/Makefile +++ b/Makefile @@ -1885,6 +1885,7 @@ GIT-CFLAGS: FORCE GIT-BUILD-OPTIONS: FORCE @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@ @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@ + @echo PYTHON_PATH=\''$(subst ','\'',$(PYTHON_PATH_SQ))'\' >>$@ @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@ -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-06-02 6:21 ` Sverre Rabbelier ` (3 preceding siblings ...) 2010-06-02 23:23 ` [PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS Brandon Casey @ 2010-06-02 23:23 ` Brandon Casey 2010-08-17 23:15 ` Sverre Rabbelier 4 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 23:23 UTC (permalink / raw) To: git; +Cc: gitster, srabbelier, Brandon Casey From: Brandon Casey <drafnel@gmail.com> This test script depends on the git-remote-testgit python script. The git-remote-testgit script makes use of the hashlib module which was released in python version 2.5. So, check the python version and skip this test if it's too old. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- By the way, I don't have python 2.5 or newer to test this. :p -brandon t/t5800-remote-helpers.sh | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/t/t5800-remote-helpers.sh b/t/t5800-remote-helpers.sh index 75a0163..2e5efe6 100755 --- a/t/t5800-remote-helpers.sh +++ b/t/t5800-remote-helpers.sh @@ -7,9 +7,13 @@ test_description='Test remote-helper import and export commands' . ./test-lib.sh -if ! test_have_prereq PYTHON +if ! test_have_prereq PYTHON || ! "$PYTHON_PATH" -c ' +import sys +if sys.hexversion < 0x02050000: + sys.exit(1) +' then - say 'skipping git remote-testgit tests: requires Python support' + say 'skipping git remote-testgit tests: requires Python 2.5 or newer' test_done fi -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-06-02 23:23 ` [PATCH 2/2] t/t5800: skip if python version is older than 2.5 Brandon Casey @ 2010-08-17 23:15 ` Sverre Rabbelier 2010-08-17 23:28 ` Jonathan Nieder 0 siblings, 1 reply; 31+ messages in thread From: Sverre Rabbelier @ 2010-08-17 23:15 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster, Brandon Casey Heya, On Wed, Jun 2, 2010 at 18:23, Brandon Casey <casey@nrlssc.navy.mil> wrote: > -if ! test_have_prereq PYTHON > +if ! test_have_prereq PYTHON || ! "$PYTHON_PATH" -c ' > +import sys > +if sys.hexversion < 0x02050000: > + sys.exit(1) > +' I just checkout out this revision, there is no PYTHON_PATH variable. So: sverre@laptop-sverre:~/code/git/t$ make t5800-remote-helpers.sh *** t5800-remote-helpers.sh *** t5800-remote-helpers.sh: line 10: : command not found * skipping git remote-testgit tests: requires Python 2.5 or newer * passed all 0 test(s) I'm not sure what is wrong here, but somehow the PYTHON_PATH variable is not propagated to the script? -- Cheers, Sverre Rabbelier ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-08-17 23:15 ` Sverre Rabbelier @ 2010-08-17 23:28 ` Jonathan Nieder 2010-08-17 23:32 ` Sverre Rabbelier 0 siblings, 1 reply; 31+ messages in thread From: Jonathan Nieder @ 2010-08-17 23:28 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: Brandon Casey, git, gitster, Brandon Casey Sverre Rabbelier wrote: > sverre@laptop-sverre:~/code/git/t$ make t5800-remote-helpers.sh > *** t5800-remote-helpers.sh *** > t5800-remote-helpers.sh: line 10: : command not found > * skipping git remote-testgit tests: requires Python 2.5 or newer > * passed all 0 test(s) > > I'm not sure what is wrong here, but somehow the PYTHON_PATH variable > is not propagated to the script? Hmm, what does your GIT-BUILD-OPTIONS say? ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-08-17 23:28 ` Jonathan Nieder @ 2010-08-17 23:32 ` Sverre Rabbelier 2010-08-17 23:37 ` Jonathan Nieder 0 siblings, 1 reply; 31+ messages in thread From: Sverre Rabbelier @ 2010-08-17 23:32 UTC (permalink / raw) To: Jonathan Nieder; +Cc: Brandon Casey, git, gitster, Brandon Casey Heya, On Tue, Aug 17, 2010 at 18:28, Jonathan Nieder <jrnieder@gmail.com> wrote: > Hmm, what does your GIT-BUILD-OPTIONS say? sverre@laptop-sverre:~/code/git$ cat GIT-BUILD-OPTIONS SHELL_PATH='/bin/sh' PERL_PATH='/usr/bin/perl' TAR='tar' NO_CURL='' NO_PERL='' NO_PYTHON='' -- Cheers, Sverre Rabbelier ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-08-17 23:32 ` Sverre Rabbelier @ 2010-08-17 23:37 ` Jonathan Nieder 2010-08-18 0:10 ` Sverre Rabbelier 0 siblings, 1 reply; 31+ messages in thread From: Jonathan Nieder @ 2010-08-17 23:37 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: Brandon Casey, git, gitster, Brandon Casey Hi again, Sverre Rabbelier wrote: > sverre@laptop-sverre:~/code/git$ cat GIT-BUILD-OPTIONS > SHELL_PATH='/bin/sh' > PERL_PATH='/usr/bin/perl' > TAR='tar' > NO_CURL='' > NO_PERL='' > NO_PYTHON='' I see. Maybe this is fixed by v1.7.2-rc0~33^2~1 (Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS, 2010-06-09) from later in the same series. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-08-17 23:37 ` Jonathan Nieder @ 2010-08-18 0:10 ` Sverre Rabbelier 2010-08-18 2:37 ` Brandon Casey 0 siblings, 1 reply; 31+ messages in thread From: Sverre Rabbelier @ 2010-08-18 0:10 UTC (permalink / raw) To: Jonathan Nieder; +Cc: Brandon Casey, git, gitster, Brandon Casey Heya, On Tue, Aug 17, 2010 at 18:37, Jonathan Nieder <jrnieder@gmail.com> wrote: > I see. Maybe this is fixed by v1.7.2-rc0~33^2~1 (Makefile: add > PYTHON_PATH to GIT-BUILD-OPTIONS, 2010-06-09) from later in the > same series. Ah, correct. So that should have gone before this one. It works if I check out and build that one. Thanks. -- Cheers, Sverre Rabbelier ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/2] t/t5800: skip if python version is older than 2.5 2010-08-18 0:10 ` Sverre Rabbelier @ 2010-08-18 2:37 ` Brandon Casey 0 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-08-18 2:37 UTC (permalink / raw) To: Sverre Rabbelier; +Cc: Jonathan Nieder, Brandon Casey, git, gitster On Tue, Aug 17, 2010 at 7:10 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote: > Heya, > > On Tue, Aug 17, 2010 at 18:37, Jonathan Nieder <jrnieder@gmail.com> wrote: >> I see. Maybe this is fixed by v1.7.2-rc0~33^2~1 (Makefile: add >> PYTHON_PATH to GIT-BUILD-OPTIONS, 2010-06-09) from later in the >> same series. Well not actually the same series. If I recall correctly, the original version of this 'skip if python vers...' patch was replaced by a resend of two patches and one of them did the' propagate PYTHON_PATH to GIT-BUILD-OPTIONS' thing. I think Junio ended up fixing up the original patch by hand, and the PYTHON_PATH bit got dropped. Later on I resent it. > Ah, correct. So that should have gone before this one. It works if I > check out and build that one. Thanks. Also, note that the test should complete successfully if run via 'make test' since PYTHON_PATH is exported in the Makefile. That's why I didn't notice the flaw at first. -Brandon ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 0:13 ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Brandon Casey 2010-06-02 6:21 ` Sverre Rabbelier @ 2010-06-02 6:37 ` Johannes Sixt 2010-06-02 14:46 ` Brandon Casey 1 sibling, 1 reply; 31+ messages in thread From: Johannes Sixt @ 2010-06-02 6:37 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster, Brandon Casey, Sverre Rabbelier Am 6/2/2010 2:13, schrieb Brandon Casey: > +if ! test_have_prereq PYTHON_2_5_OR_NEWER > then > + say 'skipping git remote-testgit tests: requires Python 2.5 or newer' ... > +++ b/t/test-lib.sh > +if test_have_prereq PYTHON && "$PYTHON_PATH" -c ' > +import sys > +if sys.hexversion < 0x02050000: > + sys.exit(1) > +' > +then > + test_set_prereq PYTHON_2_5_OR_NEWER > +fi Please don't burden all test script invocations with this check when the result is used in only one place. -- Hannes ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/5] t/t5800: skip if python version is older than 2.5 2010-06-02 6:37 ` [PATCH 1/5] " Johannes Sixt @ 2010-06-02 14:46 ` Brandon Casey 0 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 14:46 UTC (permalink / raw) To: Johannes Sixt; +Cc: git, gitster, Brandon Casey, Sverre Rabbelier On 06/02/2010 01:37 AM, Johannes Sixt wrote: > Am 6/2/2010 2:13, schrieb Brandon Casey: >> +if ! test_have_prereq PYTHON_2_5_OR_NEWER >> then >> + say 'skipping git remote-testgit tests: requires Python 2.5 or newer' > ... >> +++ b/t/test-lib.sh >> +if test_have_prereq PYTHON && "$PYTHON_PATH" -c ' >> +import sys >> +if sys.hexversion < 0x02050000: >> + sys.exit(1) >> +' >> +then >> + test_set_prereq PYTHON_2_5_OR_NEWER >> +fi > > Please don't burden all test script invocations with this check when the > result is used in only one place. Very good point. ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh 2010-06-02 0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey 2010-06-02 0:13 ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Brandon Casey @ 2010-06-02 0:13 ` Brandon Casey 2010-06-02 4:30 ` Jonathan Nieder 2010-06-02 0:13 ` [PATCH 3/5] t/t5150: remove space from sed script Brandon Casey ` (2 subsequent siblings) 4 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 0:13 UTC (permalink / raw) To: git; +Cc: gitster, Brandon Casey, Jonathan Nieder From: Brandon Casey <drafnel@gmail.com> The -e option causes the shell to exit immediately when a command exits with a non-zero exit status. This does not seem to cause a problem for Bash, but it does cause a problem for the Korn shell, like Solaris's xpg4/sh, whose unset utility returns non-zero if it is passed a variable name which was not previously set. When using xpg4/sh, git-request-pull exits while sourcing git-sh-setup since git-sh-setup tries to unset the CDPATH environment variable. When git-request-pull was originally written, it did not do any error checking and it used this shell feature to exit when an error occurred. This script now performs proper error checking and provides useful error messages, so this -e option appears to be merely a historical artifact and can be removed. Kudos to Jonathan Nieder for introducing t5150 which exercises the request-pull code path. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- git-request-pull.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git-request-pull.sh b/git-request-pull.sh index 74238b0..6dfb885 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # Copyright 2005, Ryan Anderson <ryan@michonline.com> # # This file is licensed under the GPL v2, or a later version -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh 2010-06-02 0:13 ` [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh Brandon Casey @ 2010-06-02 4:30 ` Jonathan Nieder 2010-06-02 14:21 ` Brandon Casey 0 siblings, 1 reply; 31+ messages in thread From: Jonathan Nieder @ 2010-06-02 4:30 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster, Brandon Casey Brandon Casey wrote: > When git-request-pull was originally written, it did not do any error > checking and it used this shell feature to exit when an error occurred. > This script now performs proper error checking and provides useful error > messages, so this -e option appears to be merely a historical artifact and > can be removed. Also, the MinGW port ignores -e on a #! line, so we should not rely on it. > --- a/git-request-pull.sh > +++ b/git-request-pull.sh > @@ -1,4 +1,4 @@ > -#!/bin/sh -e > +#!/bin/sh To maintain the old behavior, I think we would need something like this: -- 8< -- Subject: request-pull: more explicit error handling git request-pull includes -e on its #! line to catch miscellaneous errors, but most of the body of the script explicitly handles errors. Finish the job so we can remove the -e. Suggested-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- diff --git a/git-request-pull.sh b/git-request-pull.sh index 6dfb885..6fdea39 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -70,10 +70,10 @@ git show -s --format='The following changes since commit %H: %s (%ci) -are available in the git repository at:' $baserev -echo " $url $branch" -echo +are available in the git repository at:' $baserev && +echo " $url $branch" && +echo && -git shortlog ^$baserev $headrev -git diff -M --stat --summary $patch $merge_base..$headrev +git shortlog ^$baserev $headrev && +git diff -M --stat --summary $patch $merge_base..$headrev || exit exit $status ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh 2010-06-02 4:30 ` Jonathan Nieder @ 2010-06-02 14:21 ` Brandon Casey 2010-06-02 23:37 ` Junio C Hamano 0 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 14:21 UTC (permalink / raw) To: Jonathan Nieder; +Cc: git, gitster, Brandon Casey On 06/01/2010 11:30 PM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> When git-request-pull was originally written, it did not do any error >> checking and it used this shell feature to exit when an error occurred. >> This script now performs proper error checking and provides useful error >> messages, so this -e option appears to be merely a historical artifact and >> can be removed. > > Also, the MinGW port ignores -e on a #! line, so we should not rely on it. > >> --- a/git-request-pull.sh >> +++ b/git-request-pull.sh >> @@ -1,4 +1,4 @@ >> -#!/bin/sh -e >> +#!/bin/sh > > To maintain the old behavior, I think we would need something like > this: > > -- 8< -- > Subject: request-pull: more explicit error handling works for me. ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh 2010-06-02 14:21 ` Brandon Casey @ 2010-06-02 23:37 ` Junio C Hamano 0 siblings, 0 replies; 31+ messages in thread From: Junio C Hamano @ 2010-06-02 23:37 UTC (permalink / raw) To: Brandon Casey; +Cc: Jonathan Nieder, git, Brandon Casey Brandon Casey <casey@nrlssc.navy.mil> writes: > On 06/01/2010 11:30 PM, Jonathan Nieder wrote: >> Brandon Casey wrote: >> ... >> To maintain the old behavior, I think we would need something like >> this: >> >> -- 8< -- >> Subject: request-pull: more explicit error handling > > works for me. Will squash into a single patch; thanks. ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 3/5] t/t5150: remove space from sed script 2010-06-02 0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey 2010-06-02 0:13 ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Brandon Casey 2010-06-02 0:13 ` [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh Brandon Casey @ 2010-06-02 0:13 ` Brandon Casey 2010-06-02 4:12 ` Jonathan Nieder 2010-06-02 0:13 ` [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin Brandon Casey 2010-06-02 0:13 ` [PATCH 5/5] t/aggregate-results: accomodate systems with small max argument list length Brandon Casey 4 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 0:13 UTC (permalink / raw) To: git; +Cc: gitster, Brandon Casey, Jonathan Nieder From: Brandon Casey <drafnel@gmail.com> Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching expressions when the '!' is separated from the command that follows. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/t5150-request-pull.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh index 169d3ea..9cc0a42 100755 --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pull.sh @@ -67,7 +67,7 @@ test_expect_success 'setup: two scripts for reading pull requests' ' cat <<-\EOT >read-request.sed && #!/bin/sed -nf - / in the git repository at:$/! d + / in the git repository at:$/!d n /^$/ n s/^[ ]*\(.*\) \([^ ]*\)/please pull\ @@ -102,7 +102,7 @@ test_expect_success 'setup: two scripts for reading pull requests' ' /^ [a-zA-Z]/ n /^[a-zA-Z]* ([0-9]*):\$/ n /^\$/ N - /^\n[a-zA-Z]* ([0-9]*):\$/! { + /^\n[a-zA-Z]* ([0-9]*):\$/!{ a\\ SHORTLOG D -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 3/5] t/t5150: remove space from sed script 2010-06-02 0:13 ` [PATCH 3/5] t/t5150: remove space from sed script Brandon Casey @ 2010-06-02 4:12 ` Jonathan Nieder 0 siblings, 0 replies; 31+ messages in thread From: Jonathan Nieder @ 2010-06-02 4:12 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster, Brandon Casey Brandon Casey wrote: > Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching > expressions when the '!' is separated from the command that follows. > > Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Good catch, thanks. Acked-by: Jonathan Nieder <jrnieder@gmail.com> ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin 2010-06-02 0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey ` (2 preceding siblings ...) 2010-06-02 0:13 ` [PATCH 3/5] t/t5150: remove space from sed script Brandon Casey @ 2010-06-02 0:13 ` Brandon Casey 2010-06-02 5:47 ` Jonathan Nieder 2010-06-02 6:41 ` Johannes Sixt 2010-06-02 0:13 ` [PATCH 5/5] t/aggregate-results: accomodate systems with small max argument list length Brandon Casey 4 siblings, 2 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 0:13 UTC (permalink / raw) To: git; +Cc: gitster, Brandon Casey, Jonathan Nieder From: Brandon Casey <drafnel@gmail.com> The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a variable name which was not previously set. Since the unset is not likely to fail, ignore it's return status. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/t7006-pager.sh | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 3bc7a2a..a82bfb1 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -40,7 +40,7 @@ else fi test_expect_success 'setup' ' - unset GIT_PAGER GIT_PAGER_IN_USE && + unset GIT_PAGER GIT_PAGER_IN_USE test_might_fail git config --unset core.pager && PAGER="cat >paginated.out" && @@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' ' ' test_expect_success 'determine default pager' ' - unset PAGER GIT_PAGER && + unset PAGER GIT_PAGER test_might_fail git config --unset core.pager || cleanup_fail && @@ -173,7 +173,7 @@ then fi test_expect_success SIMPLEPAGER 'default pager is used by default' ' - unset PAGER GIT_PAGER && + unset PAGER GIT_PAGER test_might_fail git config --unset core.pager && rm -f default_pager_used || cleanup_fail && @@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' ' ' test_expect_success TTY 'PAGER overrides default pager' ' - unset GIT_PAGER && + unset GIT_PAGER test_might_fail git config --unset core.pager && rm -f PAGER_used || cleanup_fail && @@ -204,7 +204,7 @@ test_expect_success TTY 'PAGER overrides default pager' ' ' test_expect_success TTY 'core.pager overrides PAGER' ' - unset GIT_PAGER && + unset GIT_PAGER rm -f core.pager_used || cleanup_fail && -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin 2010-06-02 0:13 ` [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin Brandon Casey @ 2010-06-02 5:47 ` Jonathan Nieder 2010-06-02 6:41 ` Johannes Sixt 1 sibling, 0 replies; 31+ messages in thread From: Jonathan Nieder @ 2010-06-02 5:47 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster, Brandon Casey Brandon Casey wrote: > The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a > variable name which was not previously set. This is historical ksh behavior (only changed in 2009-01-14) even if it violates SUSv2. It probably comes up on a lot of platforms. Thanks. Acked-by: Jonathan Nieder <jrnieder@gmail.com> ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin 2010-06-02 0:13 ` [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin Brandon Casey 2010-06-02 5:47 ` Jonathan Nieder @ 2010-06-02 6:41 ` Johannes Sixt 2010-06-02 14:47 ` Brandon Casey 1 sibling, 1 reply; 31+ messages in thread From: Johannes Sixt @ 2010-06-02 6:41 UTC (permalink / raw) To: Brandon Casey; +Cc: git, gitster, Brandon Casey, Jonathan Nieder Am 6/2/2010 2:13, schrieb Brandon Casey: > test_expect_success 'setup' ' > - unset GIT_PAGER GIT_PAGER_IN_USE && > + unset GIT_PAGER GIT_PAGER_IN_USE Maybe we should terminate the line with ';' to document that it is a deliberate choice that there is no '&&'? Just an idea... -- Hannes ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin 2010-06-02 6:41 ` Johannes Sixt @ 2010-06-02 14:47 ` Brandon Casey 2010-06-02 15:32 ` [PATCH 4/5 v2] " Brandon Casey 0 siblings, 1 reply; 31+ messages in thread From: Brandon Casey @ 2010-06-02 14:47 UTC (permalink / raw) To: Johannes Sixt; +Cc: git, gitster, Brandon Casey, Jonathan Nieder On 06/02/2010 01:41 AM, Johannes Sixt wrote: > Am 6/2/2010 2:13, schrieb Brandon Casey: >> test_expect_success 'setup' ' >> - unset GIT_PAGER GIT_PAGER_IN_USE && >> + unset GIT_PAGER GIT_PAGER_IN_USE > > Maybe we should terminate the line with ';' to document that it is a > deliberate choice that there is no '&&'? > > Just an idea... I like it. ^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 4/5 v2] t/t7006: ignore return status of shell's unset builtin 2010-06-02 14:47 ` Brandon Casey @ 2010-06-02 15:32 ` Brandon Casey 0 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 15:32 UTC (permalink / raw) To: gitster; +Cc: git, j.sixt, jrnieder, Brandon Casey From: Brandon Casey <drafnel@gmail.com> The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a variable name which was not previously set. Since the unset is not likely to fail, ignore its return status, but add a semicolon as a clue that the '&&' was deliberately left off. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/t7006-pager.sh | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 3bc7a2a..a6f3677 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -40,7 +40,7 @@ else fi test_expect_success 'setup' ' - unset GIT_PAGER GIT_PAGER_IN_USE && + unset GIT_PAGER GIT_PAGER_IN_USE; test_might_fail git config --unset core.pager && PAGER="cat >paginated.out" && @@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' ' ' test_expect_success 'determine default pager' ' - unset PAGER GIT_PAGER && + unset PAGER GIT_PAGER; test_might_fail git config --unset core.pager || cleanup_fail && @@ -173,7 +173,7 @@ then fi test_expect_success SIMPLEPAGER 'default pager is used by default' ' - unset PAGER GIT_PAGER && + unset PAGER GIT_PAGER; test_might_fail git config --unset core.pager && rm -f default_pager_used || cleanup_fail && @@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' ' ' test_expect_success TTY 'PAGER overrides default pager' ' - unset GIT_PAGER && + unset GIT_PAGER; test_might_fail git config --unset core.pager && rm -f PAGER_used || cleanup_fail && @@ -204,7 +204,7 @@ test_expect_success TTY 'PAGER overrides default pager' ' ' test_expect_success TTY 'core.pager overrides PAGER' ' - unset GIT_PAGER && + unset GIT_PAGER; rm -f core.pager_used || cleanup_fail && -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 5/5] t/aggregate-results: accomodate systems with small max argument list length 2010-06-02 0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey ` (3 preceding siblings ...) 2010-06-02 0:13 ` [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin Brandon Casey @ 2010-06-02 0:13 ` Brandon Casey 4 siblings, 0 replies; 31+ messages in thread From: Brandon Casey @ 2010-06-02 0:13 UTC (permalink / raw) To: git; +Cc: gitster, Brandon Casey From: Brandon Casey <drafnel@gmail.com> IRIX 6.5 has a default maximum argument list length of 20480. The file glob that is passed to aggregate-results currently exceeds this length, and so the script cannot run successfully. Work around this issue by passing the file names in via the standard input rather than the argument list. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/Makefile | 4 +++- t/aggregate-results.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/Makefile b/t/Makefile index 25c559b..cd008a3 100644 --- a/t/Makefile +++ b/t/Makefile @@ -35,7 +35,9 @@ aggregate-results-and-cleanup: $(T) $(MAKE) clean aggregate-results: - '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-* + for f in test-results/t*-*; do \ + echo "$$f"; \ + done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL full-svn-test: diff --git a/t/aggregate-results.sh b/t/aggregate-results.sh index d5bab75..d206b7c 100755 --- a/t/aggregate-results.sh +++ b/t/aggregate-results.sh @@ -6,7 +6,7 @@ failed=0 broken=0 total=0 -for file +while read file do while read type value do -- 1.6.6.2 ^ permalink raw reply related [flat|nested] 31+ messages in thread
end of thread, other threads:[~2010-08-18 2:37 UTC | newest] Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-06-02 0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey 2010-06-02 0:13 ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Brandon Casey 2010-06-02 6:21 ` Sverre Rabbelier 2010-06-02 9:33 ` Ævar Arnfjörð Bjarmason 2010-06-02 14:44 ` Brandon Casey 2010-06-02 15:15 ` Brandon Casey 2010-06-02 16:38 ` Sverre Rabbelier 2010-06-02 16:50 ` Brandon Casey 2010-06-02 23:23 ` test suite work-around for python 2.5 requirement Brandon Casey 2010-06-02 23:23 ` [PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS Brandon Casey 2010-06-02 23:23 ` [PATCH 2/2] t/t5800: skip if python version is older than 2.5 Brandon Casey 2010-08-17 23:15 ` Sverre Rabbelier 2010-08-17 23:28 ` Jonathan Nieder 2010-08-17 23:32 ` Sverre Rabbelier 2010-08-17 23:37 ` Jonathan Nieder 2010-08-18 0:10 ` Sverre Rabbelier 2010-08-18 2:37 ` Brandon Casey 2010-06-02 6:37 ` [PATCH 1/5] " Johannes Sixt 2010-06-02 14:46 ` Brandon Casey 2010-06-02 0:13 ` [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh Brandon Casey 2010-06-02 4:30 ` Jonathan Nieder 2010-06-02 14:21 ` Brandon Casey 2010-06-02 23:37 ` Junio C Hamano 2010-06-02 0:13 ` [PATCH 3/5] t/t5150: remove space from sed script Brandon Casey 2010-06-02 4:12 ` Jonathan Nieder 2010-06-02 0:13 ` [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin Brandon Casey 2010-06-02 5:47 ` Jonathan Nieder 2010-06-02 6:41 ` Johannes Sixt 2010-06-02 14:47 ` Brandon Casey 2010-06-02 15:32 ` [PATCH 4/5 v2] " Brandon Casey 2010-06-02 0:13 ` [PATCH 5/5] t/aggregate-results: accomodate systems with small max argument list length Brandon Casey
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/git.git 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 read-only IMAP folder(s) and NNTP newsgroup(s).