summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-17 17:27:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-17 17:27:21 (GMT)
commit5178ee1ea21a21b5713b6e464db047261b09df21 (patch)
treeac5c2f0b449479345d80e1e0ec1da36cb34aa50c
parent756583f4322d97fdb8f0efd3bbc2c43ce4128711 (diff)
parent2006f0adaee036145b4261b942d944adb18647ed (diff)
downloadgit-5178ee1ea21a21b5713b6e464db047261b09df21.zip
git-5178ee1ea21a21b5713b6e464db047261b09df21.tar.gz
git-5178ee1ea21a21b5713b6e464db047261b09df21.tar.bz2
Merge branch 'rr/test-make-sure-we-have-git' into maint
* rr/test-make-sure-we-have-git: t/test-lib: make sure Git has already been built
-rwxr-xr-xt/t0000-basic.sh10
-rw-r--r--t/test-lib.sh9
2 files changed, 9 insertions, 10 deletions
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index ccb5435..741b6b6 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -18,16 +18,6 @@ swapping compression and hashing order, the person who is making the
modification *should* take notice and update the test vectors here.
'
-################################################################
-# It appears that people try to run tests without building...
-
-../git >/dev/null
-if test $? != 1
-then
- echo >&2 'You do not seem to have built git yet.'
- exit 1
-fi
-
. ./test-lib.sh
################################################################
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 78c4286..e823d86 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -51,6 +51,15 @@ then
fi
GIT_BUILD_DIR="$TEST_DIRECTORY"/..
+################################################################
+# It appears that people try to run tests without building...
+"$GIT_BUILD_DIR/git" >/dev/null
+if test $? != 1
+then
+ echo >&2 'error: you do not seem to have built git yet.'
+ exit 1
+fi
+
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
export PERL_PATH SHELL_PATH