Skip to content

Commit 86bdfa3

Browse files
committed
Merge branch 'rr/test-make-sure-we-have-git'
Only the first test t0000 in the test suite made sure we have built Git to be tested; move the check to test-lib so that it applies to all tests equally. * rr/test-make-sure-we-have-git: t/test-lib: make sure Git has already been built
2 parents cbea001 + 2006f0a commit 86bdfa3

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

t/t0000-basic.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ swapping compression and hashing order, the person who is making the
1818
modification *should* take notice and update the test vectors here.
1919
'
2020

21-
################################################################
22-
# It appears that people try to run tests without building...
23-
24-
../git >/dev/null
25-
if test $? != 1
26-
then
27-
echo >&2 'You do not seem to have built git yet.'
28-
exit 1
29-
fi
30-
3121
. ./test-lib.sh
3222

3323
################################################################

t/test-lib.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ then
5151
fi
5252
GIT_BUILD_DIR="$TEST_DIRECTORY"/..
5353

54+
################################################################
55+
# It appears that people try to run tests without building...
56+
"$GIT_BUILD_DIR/git" >/dev/null
57+
if test $? != 1
58+
then
59+
echo >&2 'error: you do not seem to have built git yet.'
60+
exit 1
61+
fi
62+
5463
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
5564
export PERL_PATH SHELL_PATH
5665

0 commit comments

Comments
 (0)