{"thread":{"id":"32509","subject":"Test failures with python versions when building git 1.8.1","startedAt":"2013-01-02T04:12:17Z","lastAt":"2013-01-02T21:25:55Z","messageCount":12,"participants":["Dan McGee","Junio C Hamano","Eric S. Raymond","Jeff King","Joachim Schmitz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"205831","messageId":"CAEik5nOqge8ix4WGf-h+0Dmz1CanH_XtQdB-CxvPsggSu1-LzQ@mail.gmail.com","threadId":"32509","inReplyTo":null,"subject":"Test failures with python versions when building git 1.8.1","fromName":"Dan McGee","fromEmail":"dan@archlinux.org","sentAt":"2013-01-02T04:12:17Z","receivedAt":"2013-01-02T04:12:17Z","isPatch":false,"sender":{"key":"dan@archlinux.org","avatar":null},"body":"A test case snuck in this release that assumes /usr/bin/python is\npython2 and causes test failures. Unlike all other tests and code\ndepending on python, this one does not respect PYTHON_PATH, which we\nexplicitly set when building git on Arch Linux due to python2 vs\npython3 differences.\n\n-Dan\n\nmake[1]: Entering directory `/build/src/git-1.8.1/t'\nrm -f -r test-results\n*** prove ***\n\nTest Summary Report\n-------------------\nt9020-remote-svn.sh                              (Wstat: 256 Tests: 6 Failed: 4)\n  Failed tests:  1-2, 5-6\n  Non-zero exit status: 1\nFiles=608, Tests=8772, 76 wallclock secs ( 4.07 usr  0.65 sys + 91.83\ncusr 37.14 csys = 133.69 CPU)\nResult: FAIL\nmake[1]: *** [prove] Error 1\nmake[1]: Leaving directory `/build/src/git-1.8.1/t'\nmake: *** [test] Error 2\n\n\n$ contrib/svn-fe/svnrdump_sim.py\n  File \"contrib/svn-fe/svnrdump_sim.py\", line 43\n    print \"usage: %s dump URL -rLOWER:UPPER\"\n                                           ^\nSyntaxError: invalid syntax\n\ndiff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py\nindex 1cfac4a..7e6148d 100755\n--- a/contrib/svn-fe/svnrdump_sim.py\n+++ b/contrib/svn-fe/svnrdump_sim.py\n@@ -40,7 +40,7 @@ def writedump(url, lower, upper):\n\n if __name__ == \"__main__\":\n         if not (len(sys.argv) in (3, 4, 5)):\n-                print \"usage: %s dump URL -rLOWER:UPPER\"\n+                print(\"usage: %s dump URL -rLOWER:UPPER\")\n                 sys.exit(1)\n         if not sys.argv[1] == 'dump': raise NotImplementedError('only\n\"dump\" is suppported.')\n         url = sys.argv[2]\n"},{"id":"205832","messageId":"7va9ss5fhq.fsf@alter.siamese.dyndns.org","threadId":"32509","inReplyTo":"CAEik5nOqge8ix4WGf-h+0Dmz1CanH_XtQdB-CxvPsggSu1-LzQ@mail.gmail.com","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-01-02T05:19:13Z","receivedAt":"2013-01-02T05:19:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dan McGee <dan@archlinux.org> writes:\n\n> A test case snuck in this release that assumes /usr/bin/python is\n> python2 and causes test failures. Unlike all other tests and code\n> depending on python, this one does not respect PYTHON_PATH, which we\n> explicitly set when building git on Arch Linux due to python2 vs\n> python3 differences.\n\nI had an impression that you are not supposed to run our scripts\nwith python3 yet (no python scripts have been checked for python3\ncompatibility), even though some people have expressed interests in\ndoing so.\n\nEric?\n"},{"id":"205833","messageId":"20130102054548.GA13483@thyrsus.com","threadId":"32509","inReplyTo":"7va9ss5fhq.fsf@alter.siamese.dyndns.org","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Eric S. Raymond","fromEmail":"esr@thyrsus.com","sentAt":"2013-01-02T05:45:48Z","receivedAt":"2013-01-02T05:45:48Z","isPatch":false,"sender":{"key":"esr@thyrsus.com","avatar":"https://avatars.githubusercontent.com/u/727961?v=4"},"body":"Junio C Hamano <gitster@pobox.com>:\n> Dan McGee <dan@archlinux.org> writes:\n> \n> > A test case snuck in this release that assumes /usr/bin/python is\n> > python2 and causes test failures. Unlike all other tests and code\n> > depending on python, this one does not respect PYTHON_PATH, which we\n> > explicitly set when building git on Arch Linux due to python2 vs\n> > python3 differences.\n> \n> I had an impression that you are not supposed to run our scripts\n> with python3 yet (no python scripts have been checked for python3\n> compatibility), even though some people have expressed interests in\n> doing so.\n> \n> Eric?\n\nYeah, git's stuff is nowhere even *near* python3 ready.\n\nI have it on my to-do list to run 2to3 on the in-tree scripts as a\ndiagnostic, but I haven't had time to do that yet...mainly because\ncvsps/cvsimport blew up in my face when I poked at them.\n\nNow I need to go beat parsecvs into shape and run both it and cvs2git\nagainst the CVS torture tests I'm developing, so the 2to3 check won't\nhappen for a week or two at least. Sorry.\n\nAs in a general thing, I wouldn't advise worrying too much about python3\ncompatibility.  That version is not gaining adoption very fast, mainly\ndue to the rat's nest around plain strings vs. UTF-8 which can make\ncode conversion a serious pain in the ass.\n-- \n\t\t<a href=\"http://www.catb.org/~esr/\">Eric S. Raymond</a>\n"},{"id":"205834","messageId":"20130102065345.GA8685@sigill.intra.peff.net","threadId":"32509","inReplyTo":"7va9ss5fhq.fsf@alter.siamese.dyndns.org","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-02T06:53:45Z","receivedAt":"2013-01-02T06:53:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 01, 2013 at 09:19:13PM -0800, Junio C Hamano wrote:\n\n> Dan McGee <dan@archlinux.org> writes:\n> \n> > A test case snuck in this release that assumes /usr/bin/python is\n> > python2 and causes test failures. Unlike all other tests and code\n> > depending on python, this one does not respect PYTHON_PATH, which we\n> > explicitly set when building git on Arch Linux due to python2 vs\n> > python3 differences.\n> \n> I had an impression that you are not supposed to run our scripts\n> with python3 yet (no python scripts have been checked for python3\n> compatibility), even though some people have expressed interests in\n> doing so.\n> \n> Eric?\n\nYeah, but the worrying thing to me is that we are not respecting\nPYTHON_PATH. So even if Arch does everything right, it is getting\npunished just for having python3 on the system at all.\n\nI think we need to either:\n\n  1. Build contrib/svn-fe/svnrdump_sim.py into svnrdump using our normal\n     build procedure, which handles $PYTHON_PATH (right now we seem to\n     just symlink[1] it into place as svnrdump during the test script\n     run).\n\n  2. Create svnrdump as a shell script in the test suite to do something\n     like[2]:\n\n       $PYTHON_PATH \"$TEST_DIRECTORY\"/../contrib/svn-fe/svnrdump_sim.py\n\n-Peff\n\n[1] This symlink is doubly wrong, because any use of symbolic links\n    in the test scripts needs to depend on the SYMLINKS prereq, and this\n    does not.\n\n[2] In both the current code and what I showed above, the test scripts\n    depend on things in contrib/. This is probably a bad idea in\n    general, as the quality of what goes into contrib is not as closely\n    watched (especially with respect to things like portability).\n    Certainly I would not have known to look more carefully at a patch\n    to contrib/svn-fe for breakage to the test suite.\n\n    FWIW, we also have this situation with t9902 (bash completion),\n    though the dependency is a little more obvious there. It might be\n    worth promoting bash completion out of contrib (or alternatively,\n    demoting t9902 into contrib/completion/, possibly with a feature to\n    make it easier to run tests out of contrib).\n"},{"id":"205837","messageId":"7v1ue459yh.fsf@alter.siamese.dyndns.org","threadId":"32509","inReplyTo":"20130102065345.GA8685@sigill.intra.peff.net","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-01-02T07:18:46Z","receivedAt":"2013-01-02T07:18:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> [1] This symlink is doubly wrong, because any use of symbolic links\n>     in the test scripts needs to depend on the SYMLINKS prereq, and this\n>     does not.\n\nYeah, I think we have discussed this once already in\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/210688/focus=210714\n\n> [2] In both the current code and what I showed above, the test scripts\n>     depend on things in contrib/. This is probably a bad idea in\n>     general, as the quality of what goes into contrib is not as closely\n>     watched (especially with respect to things like portability).\n>     Certainly I would not have known to look more carefully at a patch\n>     to contrib/svn-fe for breakage to the test suite.\n\nAs long as such tests are made skippable with appropriate\nprerequisites, I do not think it is bad to have their tests in t/; I\nwould say it is rather better than having them in contrib/ and leave\nit not run by anybody, which happened to some of the stuff in\ncontrib/ already.\n\n>     ... possibly with a feature to\n>     make it easier to run tests out of contrib).\n\nYes, that certainly is a workable alternative.\n"},{"id":"205849","messageId":"20130102085935.GB9328@sigill.intra.peff.net","threadId":"32509","inReplyTo":"7v1ue459yh.fsf@alter.siamese.dyndns.org","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-02T08:59:35Z","receivedAt":"2013-01-02T08:59:35Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 01, 2013 at 11:18:46PM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > [1] This symlink is doubly wrong, because any use of symbolic links\n> >     in the test scripts needs to depend on the SYMLINKS prereq, and this\n> >     does not.\n> \n> Yeah, I think we have discussed this once already in\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/210688/focus=210714\n\nThanks for the pointer; it looks like nothing productive came of the\nearlier discussion. To give a hat trick of failure to this line of code,\nI notice that the existing code also does not properly put quotes around\n$GIT_BUILD_DIR.\n\n> > [2] In both the current code and what I showed above, the test scripts\n> >     depend on things in contrib/. This is probably a bad idea in\n> >     general, as the quality of what goes into contrib is not as closely\n> >     watched (especially with respect to things like portability).\n> >     Certainly I would not have known to look more carefully at a patch\n> >     to contrib/svn-fe for breakage to the test suite.\n> \n> As long as such tests are made skippable with appropriate\n> prerequisites, I do not think it is bad to have their tests in t/; I\n> would say it is rather better than having them in contrib/ and leave\n> it not run by anybody, which happened to some of the stuff in\n> contrib/ already.\n\nGood point. While my sense of decorum wants to keep contrib totally\nsplit out, from a practical point of view, it is better to have more\npeople run the tests and report failures than not.\n\nWhether we end up doing something with contrib and tests or not, the\npatch below gives a minimal fix in the meantime. Dan, does it fix your\nproblem?\n\n-- >8 --\nSubject: [PATCH] t9020: don't run python from $PATH\n\nIn t9020, we symlink in a python script from contrib to help\nwith the testing. However, we don't munge its #!-line, which\nmeans we may run the wrong python (we want the one in\nPYTHON_PATH). On top of this, we use a symlink without\nchecking the SYMLINKS prereq, and we fail to properly quote\nGIT_BUILD_DIR, which may have spaces.\n\nInstead of symlinking, let's just write a small script which\nwill feed the contrib script to PYTHON_PATH. To avoid\nquoting issues, we just export the variables the script\nneeds to run.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/t9020-remote-svn.sh | 5 ++++-\n t/test-lib.sh         | 2 +-\n 2 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\nindex 4f2dfe0..416623b 100755\n--- a/t/t9020-remote-svn.sh\n+++ b/t/t9020-remote-svn.sh\n@@ -14,7 +14,10 @@ export PATH=\"$HOME:$PATH\"\n \n # We override svnrdump by placing a symlink to the svnrdump-emulator in .\n export PATH=\"$HOME:$PATH\"\n-ln -sf $GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py \"$HOME/svnrdump\"\n+export GIT_BUILD_DIR\n+write_script svnrdump <<\\EOF\n+exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR\"/contrib/svn-fe/svnrdump_sim.py \"$@\"\n+EOF\n \n init_git () {\n \trm -fr .git &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex f50f834..c17db19 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -45,7 +45,7 @@ fi\n fi\n \n . \"$GIT_BUILD_DIR\"/GIT-BUILD-OPTIONS\n-export PERL_PATH SHELL_PATH\n+export PERL_PATH SHELL_PATH PYTHON_PATH\n \n # if --tee was passed, write the output not only to the terminal, but\n # additionally to the file test-results/$BASENAME.out, too.\n-- \n1.8.1.rc3.4.gf3a2f57\n"},{"id":"205851","messageId":"kc0tg0$suo$1@ger.gmane.org","threadId":"32509","inReplyTo":"20130102085935.GB9328@sigill.intra.peff.net","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2013-01-02T09:09:17Z","receivedAt":"2013-01-02T09:09:17Z","isPatch":false,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"Jeff King wrote:\n> On Tue, Jan 01, 2013 at 11:18:46PM -0800, Junio C Hamano wrote:\n>\n>> Jeff King <peff@peff.net> writes:\n>>\n>>> [1] This symlink is doubly wrong, because any use of symbolic links\n>>>     in the test scripts needs to depend on the SYMLINKS prereq, and\n>>>     this does not.\n>>\n>> Yeah, I think we have discussed this once already in\n>>\n>> http://thread.gmane.org/gmane.comp.version-control.git/210688/focus=210714\n>\n> Thanks for the pointer; it looks like nothing productive came of the\n> earlier discussion. To give a hat trick of failure to this line of\n> code, I notice that the existing code also does not properly put\n> quotes around $GIT_BUILD_DIR.\n>\n>>> [2] In both the current code and what I showed above, the test\n>>>     scripts depend on things in contrib/. This is probably a bad\n>>>     idea in general, as the quality of what goes into contrib is\n>>>     not as closely watched (especially with respect to things like\n>>>     portability). Certainly I would not have known to look more\n>>>     carefully at a patch to contrib/svn-fe for breakage to the test\n>>> suite.\n>>\n>> As long as such tests are made skippable with appropriate\n>> prerequisites, I do not think it is bad to have their tests in t/; I\n>> would say it is rather better than having them in contrib/ and leave\n>> it not run by anybody, which happened to some of the stuff in\n>> contrib/ already.\n>\n> Good point. While my sense of decorum wants to keep contrib totally\n> split out, from a practical point of view, it is better to have more\n> people run the tests and report failures than not.\n>\n> Whether we end up doing something with contrib and tests or not, the\n> patch below gives a minimal fix in the meantime. Dan, does it fix your\n> problem?\n>\n> -- >8 --\n> Subject: [PATCH] t9020: don't run python from $PATH\n>\n> In t9020, we symlink in a python script from contrib to help\n> with the testing. However, we don't munge its #!-line, which\n> means we may run the wrong python (we want the one in\n> PYTHON_PATH). On top of this, we use a symlink without\n> checking the SYMLINKS prereq, and we fail to properly quote\n> GIT_BUILD_DIR, which may have spaces.\n>\n> Instead of symlinking, let's just write a small script which\n> will feed the contrib script to PYTHON_PATH. To avoid\n> quoting issues, we just export the variables the script\n> needs to run.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> t/t9020-remote-svn.sh | 5 ++++-\n> t/test-lib.sh         | 2 +-\n> 2 files changed, 5 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\n> index 4f2dfe0..416623b 100755\n> --- a/t/t9020-remote-svn.sh\n> +++ b/t/t9020-remote-svn.sh\n> @@ -14,7 +14,10 @@ export PATH=\"$HOME:$PATH\"\n>\n> # We override svnrdump by placing a symlink to the svnrdump-emulator\n> in . export PATH=\"$HOME:$PATH\"\n\nWith this patch that comment is no longer true.\n\n> -ln -sf $GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py \"$HOME/svnrdump\"\n> +export GIT_BUILD_DIR\n> +write_script svnrdump <<\\EOF\n> +exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR\"/contrib/svn-fe/svnrdump_sim.py\n> \"$@\" +EOF\n>\n> init_git () {\n>  rm -fr .git &&\n"},{"id":"205856","messageId":"CAEik5nMRAoHdx166Q7Zb5Yve6DiyVgN6EXQWGF=GgUtSyjiuSA@mail.gmail.com","threadId":"32509","inReplyTo":"20130102085935.GB9328@sigill.intra.peff.net","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Dan McGee","fromEmail":"dan@archlinux.org","sentAt":"2013-01-02T14:18:12Z","receivedAt":"2013-01-02T14:18:12Z","isPatch":false,"sender":{"key":"dan@archlinux.org","avatar":null},"body":"On Wed, Jan 2, 2013 at 2:59 AM, Jeff King <peff@peff.net> wrote:\n> On Tue, Jan 01, 2013 at 11:18:46PM -0800, Junio C Hamano wrote:\n>\n>> Jeff King <peff@peff.net> writes:\n>>\n>> > [1] This symlink is doubly wrong, because any use of symbolic links\n>> >     in the test scripts needs to depend on the SYMLINKS prereq, and this\n>> >     does not.\n>>\n>> Yeah, I think we have discussed this once already in\n>>\n>> http://thread.gmane.org/gmane.comp.version-control.git/210688/focus=210714\n>\n> Thanks for the pointer; it looks like nothing productive came of the\n> earlier discussion. To give a hat trick of failure to this line of code,\n> I notice that the existing code also does not properly put quotes around\n> $GIT_BUILD_DIR.\n>\n>> > [2] In both the current code and what I showed above, the test scripts\n>> >     depend on things in contrib/. This is probably a bad idea in\n>> >     general, as the quality of what goes into contrib is not as closely\n>> >     watched (especially with respect to things like portability).\n>> >     Certainly I would not have known to look more carefully at a patch\n>> >     to contrib/svn-fe for breakage to the test suite.\n>>\n>> As long as such tests are made skippable with appropriate\n>> prerequisites, I do not think it is bad to have their tests in t/; I\n>> would say it is rather better than having them in contrib/ and leave\n>> it not run by anybody, which happened to some of the stuff in\n>> contrib/ already.\n>\n> Good point. While my sense of decorum wants to keep contrib totally\n> split out, from a practical point of view, it is better to have more\n> people run the tests and report failures than not.\n>\n> Whether we end up doing something with contrib and tests or not, the\n> patch below gives a minimal fix in the meantime. Dan, does it fix your\n> problem?\n\nThis works great now, thanks! I ran it through our package build\nscripts and all tests now pass as expected.\n\nSigned-off-by: Dan McGee <dan@archlinux.org>\n\n> -- >8 --\n> Subject: [PATCH] t9020: don't run python from $PATH\n>\n> In t9020, we symlink in a python script from contrib to help\n> with the testing. However, we don't munge its #!-line, which\n> means we may run the wrong python (we want the one in\n> PYTHON_PATH). On top of this, we use a symlink without\n> checking the SYMLINKS prereq, and we fail to properly quote\n> GIT_BUILD_DIR, which may have spaces.\n>\n> Instead of symlinking, let's just write a small script which\n> will feed the contrib script to PYTHON_PATH. To avoid\n> quoting issues, we just export the variables the script\n> needs to run.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  t/t9020-remote-svn.sh | 5 ++++-\n>  t/test-lib.sh         | 2 +-\n>  2 files changed, 5 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\n> index 4f2dfe0..416623b 100755\n> --- a/t/t9020-remote-svn.sh\n> +++ b/t/t9020-remote-svn.sh\n> @@ -14,7 +14,10 @@ export PATH=\"$HOME:$PATH\"\n>\n>  # We override svnrdump by placing a symlink to the svnrdump-emulator in .\n>  export PATH=\"$HOME:$PATH\"\n> -ln -sf $GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py \"$HOME/svnrdump\"\n> +export GIT_BUILD_DIR\n> +write_script svnrdump <<\\EOF\n> +exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR\"/contrib/svn-fe/svnrdump_sim.py \"$@\"\n> +EOF\n>\n>  init_git () {\n>         rm -fr .git &&\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index f50f834..c17db19 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -45,7 +45,7 @@ fi\n>  fi\n>\n>  . \"$GIT_BUILD_DIR\"/GIT-BUILD-OPTIONS\n> -export PERL_PATH SHELL_PATH\n> +export PERL_PATH SHELL_PATH PYTHON_PATH\n>\n>  # if --tee was passed, write the output not only to the terminal, but\n>  # additionally to the file test-results/$BASENAME.out, too.\n> --\n> 1.8.1.rc3.4.gf3a2f57\n>\n"},{"id":"205860","messageId":"7vip7f4k7x.fsf@alter.siamese.dyndns.org","threadId":"32509","inReplyTo":"20130102085935.GB9328@sigill.intra.peff.net","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-01-02T16:34:42Z","receivedAt":"2013-01-02T16:34:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Whether we end up doing something with contrib and tests or not, the\n> patch below gives a minimal fix in the meantime.\n\nReplacing the symbolic link with write_script that uses exported\nvariables looks like a familiar pattern.  I like it.\n\nOh, wait.  That pattern is of course familiar, because 5a02966\n(t9020: use configured Python to run the test helper, 2012-12-18)\nhas been in 'next', and is planned for the first batch.\n\n\n\n> -- >8 --\n> Subject: [PATCH] t9020: don't run python from $PATH\n>\n> In t9020, we symlink in a python script from contrib to help\n> with the testing. However, we don't munge its #!-line, which\n> means we may run the wrong python (we want the one in\n> PYTHON_PATH). On top of this, we use a symlink without\n> checking the SYMLINKS prereq, and we fail to properly quote\n> GIT_BUILD_DIR, which may have spaces.\n>\n> Instead of symlinking, let's just write a small script which\n> will feed the contrib script to PYTHON_PATH. To avoid\n> quoting issues, we just export the variables the script\n> needs to run.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  t/t9020-remote-svn.sh | 5 ++++-\n>  t/test-lib.sh         | 2 +-\n>  2 files changed, 5 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\n> index 4f2dfe0..416623b 100755\n> --- a/t/t9020-remote-svn.sh\n> +++ b/t/t9020-remote-svn.sh\n> @@ -14,7 +14,10 @@ export PATH=\"$HOME:$PATH\"\n>  \n>  # We override svnrdump by placing a symlink to the svnrdump-emulator in .\n>  export PATH=\"$HOME:$PATH\"\n> -ln -sf $GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py \"$HOME/svnrdump\"\n> +export GIT_BUILD_DIR\n> +write_script svnrdump <<\\EOF\n> +exec \"$PYTHON_PATH\" \"$GIT_BUILD_DIR\"/contrib/svn-fe/svnrdump_sim.py \"$@\"\n> +EOF\n>  \n>  init_git () {\n>  \trm -fr .git &&\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index f50f834..c17db19 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -45,7 +45,7 @@ fi\n>  fi\n>  \n>  . \"$GIT_BUILD_DIR\"/GIT-BUILD-OPTIONS\n> -export PERL_PATH SHELL_PATH\n> +export PERL_PATH SHELL_PATH PYTHON_PATH\n>  \n>  # if --tee was passed, write the output not only to the terminal, but\n>  # additionally to the file test-results/$BASENAME.out, too.\n"},{"id":"205861","messageId":"7vehi34k5s.fsf@alter.siamese.dyndns.org","threadId":"32509","inReplyTo":"CAEik5nMRAoHdx166Q7Zb5Yve6DiyVgN6EXQWGF=GgUtSyjiuSA@mail.gmail.com","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-01-02T16:35:59Z","receivedAt":"2013-01-02T16:35:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dan McGee <dan@archlinux.org> writes:\n\n> This works great now, thanks! I ran it through our package build\n> scripts and all tests now pass as expected.\n\nIf you have a chance, could you try tip of the 'next' branch without\nthis patch applied?  We had an equivalent patch cooking there for\nsome time by now.\n\nThanks.\n"},{"id":"205881","messageId":"20130102205435.GA24810@sigill.intra.peff.net","threadId":"32509","inReplyTo":"7vip7f4k7x.fsf@alter.siamese.dyndns.org","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-02T20:54:35Z","receivedAt":"2013-01-02T20:54:35Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 02, 2013 at 08:34:42AM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > Whether we end up doing something with contrib and tests or not, the\n> > patch below gives a minimal fix in the meantime.\n> \n> Replacing the symbolic link with write_script that uses exported\n> variables looks like a familiar pattern.  I like it.\n> \n> Oh, wait.  That pattern is of course familiar, because 5a02966\n> (t9020: use configured Python to run the test helper, 2012-12-18)\n> has been in 'next', and is planned for the first batch.\n\nGreat minds think alike, I guess?\n\nWould have been nice to mention that you had done a patch when you\npointed to the unproductive thread. :P But I think you can take the\nsimilarity of our patches and commit messages as my endorsement of\n5a02966. :)\n\n-Peff\n"},{"id":"205886","messageId":"CAEik5nPL1J8m3_CyF0m1=4HWran4+6nRGZKtHOEdD_FWBHX6bA@mail.gmail.com","threadId":"32509","inReplyTo":"7vehi34k5s.fsf@alter.siamese.dyndns.org","subject":"Re: Test failures with python versions when building git 1.8.1","fromName":"Dan McGee","fromEmail":"dan@archlinux.org","sentAt":"2013-01-02T21:25:55Z","receivedAt":"2013-01-02T21:25:55Z","isPatch":false,"sender":{"key":"dan@archlinux.org","avatar":null},"body":"On Wed, Jan 2, 2013 at 10:35 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Dan McGee <dan@archlinux.org> writes:\n>\n>> This works great now, thanks! I ran it through our package build\n>> scripts and all tests now pass as expected.\n>\n> If you have a chance, could you try tip of the 'next' branch without\n> this patch applied?  We had an equivalent patch cooking there for\n> some time by now.\n\nYeah, this worked great as well. Thanks again everyone.\n\n-Dan\n"}]}