[PATCH-maint] test-lib.sh: Help test_create_repo() find the templates dir
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Apr 21, 2009, 09:19 UTC
- Message-ID
- <1240305543-27163-1-git-send-email-git@drmicha.warpmail.net>
- In-Reply-To
- <7vocuqbmgu.fsf@gitster.siamese.dyndns.org>
Currently, test_create_repo() expects that templates can be found below $GIT_EXEC_DIR. This assumption fails when tests are run against a git installed somewhere else. Therefore, use $TEST_DIRECTORY as introduced in 2d84e9fb and expect templates to be present in $TEST_DIRECTORY/.. which should be the root dir of the git checkout.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> --- This is a patch against maint as discussed in http://article.gmane.org/gmane.comp.version-control.git/11699 although maint does not (yet) contain a6d63b7 which actually exposes the problem.
The patch does not apply cleanly to master and needs a different commit message there anyways. Therefore, I will send a follow-up with a patch against master. I suggest considering this "maint for master", i.e. applying to master where the bug is actually exposed.
t/test-lib.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh index 59d82d2..dbce26a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -434,7 +434,7 @@ test_create_repo () { repo="$1" mkdir -p "$repo" cd "$repo" || error "Cannot setup test environment" - "$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >&3 2>&4 || + "$GIT_EXEC_PATH/git" init "--template=$TEST_DIRECTORY/../templates/blt/" >&3 2>&4 || error "cannot run git init -- have you built things yet?" mv .git/hooks .git/hooks-disabled cd "$owd"
-- 1.6.3.rc0.201.g3759d