Browse Source

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.
maint
Junio C Hamano 16 years ago
parent
commit
d291a9a6c8
  1. 14
      t/test-lib.sh

14
t/test-lib.sh

@ -457,7 +457,7 @@ test_create_repo () { @@ -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 () { @@ -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" &&

Loading…
Cancel
Save