aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-21 23:24:40 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-21 23:24:40 -0700
commitd291a9a6c8165efee95b3c1ceb814c39460ddbea (patch)
tree0cbd41cf864ea42510096a36880b72cf81a1459c
parentc511549e0c6848f00bd19f152b8ab42261ff5d0c (diff)
parent6720721e152aee230387546efac865319f025597 (diff)
downloadgit-d291a9a6c8165efee95b3c1ceb814c39460ddbea.tar.gz
git-d291a9a6c8165efee95b3c1ceb814c39460ddbea.tar.xz
Merge branch 'mg/test-installed'
* mg/test-installed: test-lib.sh: Allow running the test suite against installed git test-lib.sh: Test for presence of git-init in the right path.
-rw-r--r--t/test-lib.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 638cca41e..7ff75644c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -457,7 +457,7 @@ test_create_repo () {
repo="$1"
mkdir -p "$repo"
cd "$repo" || error "Cannot setup test environment"
- "$GIT_EXEC_PATH/git" init "--template=$owd/../templates/blt/" >&3 2>&4 ||
+ "$GIT_EXEC_PATH/git-init" "--template=$owd/../templates/blt/" >&3 2>&4 ||
error "cannot run git init -- have you built things yet?"
mv .git/hooks .git/hooks-disabled
cd "$owd"
@@ -517,8 +517,16 @@ test_done () {
TEST_DIRECTORY=$(pwd)
if test -z "$valgrind"
then
- PATH=$TEST_DIRECTORY/..:$PATH
- GIT_EXEC_PATH=$TEST_DIRECTORY/..
+ if test -z "$GIT_TEST_INSTALLED"
+ then
+ PATH=$TEST_DIRECTORY/..:$PATH
+ GIT_EXEC_PATH=$TEST_DIRECTORY/..
+ else
+ GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path) ||
+ error "Cannot run git from $GIT_TEST_INSTALLED."
+ PATH=$GIT_TEST_INSTALLED:$TEST_DIRECTORY/..:$PATH
+ GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH}
+ fi
else
make_symlink () {
test -h "$2" &&