Skip to content

Commit

Permalink
Merge branch 'mg/test-installed'
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
Junio C Hamano committed Mar 22, 2009
2 parents c511549 + 6720721 commit d291a9a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" &&
Expand Down

0 comments on commit d291a9a

Please sign in to comment.