File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,37 @@ IDs. When object ID computation changes, like in the previous case of
17
17
swapping compression and hashing order, the person who is making the
18
18
modification *should* take notice and update the test vectors here.
19
19
'
20
+
21
+ # ###############################################################
22
+ # It appears that people are getting bitten by not installing
23
+ # 'merge' (usually part of RCS package in binary distributions)
24
+ # or have too old python without subprocess. Check them and error
25
+ # out before running any tests. Also catch the bogosity of trying
26
+ # to run tests without building while we are at it.
27
+
28
+ ../git > /dev/null
29
+ if test $? ! = 1
30
+ then
31
+ echo >&2 ' You do not seem to have built git yet.'
32
+ exit 1
33
+ fi
34
+
35
+ merge > /dev/null 2> /dev/null
36
+ if test $? == 127
37
+ then
38
+ echo >&2 ' You do not seem to have "merge" installed.
39
+ Please check INSTALL document.'
40
+ exit 1
41
+ fi
42
+
20
43
. ./test-lib.sh
21
44
45
+ " $PYTHON " -c ' import subprocess' || {
46
+ echo >&2 ' Your python seem to lack "subprocess" module.
47
+ Please check INSTALL document.'
48
+ exit 1
49
+ }
50
+
22
51
# ###############################################################
23
52
# init-db has been done in an empty repository.
24
53
# make sure it is empty.
Original file line number Diff line number Diff line change @@ -179,18 +179,23 @@ export PATH GIT_EXEC_PATH
179
179
PYTHON=` sed -e ' 1{
180
180
s/^#!//
181
181
q
182
- }' ../git-merge-recursive` &&
182
+ }' ../git-merge-recursive` || {
183
+ error " You haven't built things yet, have you?"
184
+ }
183
185
" $PYTHON " -c ' import subprocess' 2> /dev/null || {
184
186
PYTHONPATH=$( pwd) /../compat
185
187
export PYTHONPATH
186
188
}
189
+ test -d ../templates/blt || {
190
+ error " You haven't built things yet, have you?"
191
+ }
187
192
188
193
# Test repository
189
194
test=trash
190
195
rm -fr " $test "
191
196
mkdir " $test "
192
197
cd " $test "
193
198
" $GIT_EXEC_PATH /git" init-db --template=../../templates/blt/ 2> /dev/null ||
194
- error " cannot run git init-db"
199
+ error " cannot run git init-db -- have you built things yet? "
195
200
196
201
mv .git/hooks .git/hooks-disabled
You can’t perform that action at this time.
0 commit comments