* Failure in t6021 on Red Hat Enterprise Linux 4
@ 2005-12-07 16:49 Mark Allen
2005-12-07 17:38 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Mark Allen @ 2005-12-07 16:49 UTC (permalink / raw)
To: git
Running t/t6021-crisscross-merge.sh -v -i on Red Hat Enterprise Linux 4 Workstation with
python 2.3.4 installed, I found a fatal error in the test.
Apparently, this release of python doesn't have the subprocess module installed. In what
package is that located? How can I fix this error?
Thanks!
--Mark
-- BEGIN --
[mallen@mrhat t]$ rpm -q python
python-2.3.4-14.1
...SNIP...
git commit -m D8 file
Committing initial tree ec103796f9a6ca8367bd90cd88edf39c5dd2ae26
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Traceback (most recent call last):
File "/home/mallen/git/git.git/t/../git-merge-recursive", line 13, in ?
from gitMergeCommon import *
File "/home/mallen/git/git.git/gitMergeCommon.py", line 18, in ?
import subprocess
ImportError: No module named subprocess
Automatic merge failed/prevented; fix up by hand
...SNIP...
--- END ---
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failure in t6021 on Red Hat Enterprise Linux 4
2005-12-07 16:49 Failure in t6021 on Red Hat Enterprise Linux 4 Mark Allen
@ 2005-12-07 17:38 ` Junio C Hamano
2005-12-07 18:12 ` Mark Allen
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2005-12-07 17:38 UTC (permalink / raw)
To: Mark Allen; +Cc: git
Mark Allen <mrallen1@yahoo.com> writes:
> Running t/t6021-crisscross-merge.sh -v -i on Red Hat Enterprise Linux 4 Workstation with
> python 2.3.4 installed, I found a fatal error in the test.
Are you using git RPM, or building by hand?
If the latter, "grep -A2 python INSTALL" may be helpful.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failure in t6021 on Red Hat Enterprise Linux 4
2005-12-07 17:38 ` Junio C Hamano
@ 2005-12-07 18:12 ` Mark Allen
2005-12-07 18:54 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Mark Allen @ 2005-12-07 18:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
--- Junio C Hamano <junkio@cox.net> wrote:
> Are you using git RPM, or building by hand?
> If the latter, "grep -A2 python INSTALL" may be helpful.
Definitely. Thanks for the pointer -- I rebuilt my git installation with the correct
flag, but there's a bootstrapping problem with the test -- and I'm not a good enough
python programmer to fix it very well.
So, basically the problem is that the subprocess.py module is in the compat directory,
and by default (I think) the git-merge-recursive being tested is only looking in
$HOME/git/git.git where it finds and loads gitMergeCommon.py, but gitMergeCommon.py is
not looking in $HOME/git/git.git/compat which is where subprocess.py lives.
So I hacked in to git-merge-recursive this line at the top of the file
sys.path.append('''/home/mallen/git/git.git/compat''')
at the very top and now the test passes.
So maybe this points out a problem in the Makefile or in the substitution the Makefile is
using to put in @@GIT_PYTHON_PATH@@
I'm not sure I've clearly explained the issue, and like I said, I'm kind of a Python
baby, so I'm not sure what the best way to fix this problem might be.
Thanks,
--Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Failure in t6021 on Red Hat Enterprise Linux 4
2005-12-07 18:12 ` Mark Allen
@ 2005-12-07 18:54 ` Junio C Hamano
2005-12-08 6:07 ` [PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2005-12-07 18:54 UTC (permalink / raw)
To: Mark Allen; +Cc: git
Mark Allen <mrallen1@yahoo.com> writes:
> So, basically the problem is that the subprocess.py module is
> in the compat directory, and by default (I think)..
Ah, you are right.
Just like we fix PATH and GIT_EXEC_PATH during the test
execution, we need to do something with PYTHONPATH environment
variable (this one is _without_ underscore), I think.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests.
2005-12-07 18:54 ` Junio C Hamano
@ 2005-12-08 6:07 ` Junio C Hamano
2005-12-08 17:04 ` Mark Allen
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2005-12-08 6:07 UTC (permalink / raw)
To: Mark Allen; +Cc: git
Otherwise the test will not succeed without installing.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
Junio C Hamano <junkio@cox.net> writes:
> Mark Allen <mrallen1@yahoo.com> writes:
>
>> So, basically the problem is that the subprocess.py module is
>> in the compat directory, and by default (I think)..
>
> Ah, you are right.
>
> Just like we fix PATH and GIT_EXEC_PATH during the test
> execution, we need to do something with PYTHONPATH environment
> variable (this one is _without_ underscore), I think.
This seems to fix it for me.
t/test-lib.sh | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
49ccb0877f64308662669a09db7b221419c13d0a
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f2eccd7..0539dac 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -172,7 +172,18 @@ test_done () {
# t/ subdirectory and are run in trash subdirectory.
PATH=$(pwd)/..:$PATH
GIT_EXEC_PATH=$(pwd)/..
-export GIT_EXEC_PATH
+export PATH GIT_EXEC_PATH
+
+# Similarly use ../compat/subprocess.py if our python does not
+# have subprocess.py on its own.
+PYTHON=`sed -e '1{
+ s/^#!//
+ q
+}' ../git-merge-recursive` &&
+"$PYTHON" -c 'import subprocess' 2>/dev/null || {
+ PYTHONPATH=$(pwd)/../compat
+ export PYTHONPATH
+}
# Test repository
test=trash
--
0.99.9.GIT
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests.
2005-12-08 6:07 ` [PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests Junio C Hamano
@ 2005-12-08 17:04 ` Mark Allen
0 siblings, 0 replies; 6+ messages in thread
From: Mark Allen @ 2005-12-08 17:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
--- Junio C Hamano <junkio@cox.net> wrote:
> This seems to fix it for me.
Works on my build here. Thanks!
--Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-12-08 17:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-07 16:49 Failure in t6021 on Red Hat Enterprise Linux 4 Mark Allen
2005-12-07 17:38 ` Junio C Hamano
2005-12-07 18:12 ` Mark Allen
2005-12-07 18:54 ` Junio C Hamano
2005-12-08 6:07 ` [PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests Junio C Hamano
2005-12-08 17:04 ` Mark Allen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.