summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-18 23:27:43 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-19 00:21:54 (GMT)
commit74d20040cafdced657efbf49795183d209a3a07b (patch)
tree533dce0336c62e5067983a050cc07e1904e8e6b3 /t/test-lib.sh
parent8336afa563fbeff35e531396273065161181f04c (diff)
downloadgit-74d20040cafdced657efbf49795183d209a3a07b.zip
git-74d20040cafdced657efbf49795183d209a3a07b.tar.gz
git-74d20040cafdced657efbf49795183d209a3a07b.tar.bz2
fix testsuite: make sure they use templates freshly built from the source
The initial t/trash repository for testing was created properly but over time we gained many tests that create secondary test repositories with init-db or clone and they were not careful enough. This fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/test-lib.sh')
-rwxr-xr-xt/test-lib.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ac7be76..7e91497 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -182,6 +182,16 @@ test_create_repo () {
cd "$owd"
}
+# Many tests do init-db and clone but they must be told about the freshly
+# built templates.
+git_init_db () {
+ git init-db --template="$GIT_EXEC_PATH/templates/blt/" "$@"
+}
+
+git_clone () {
+ git clone --template="$GIT_EXEC_PATH/templates/blt/" "$@"
+}
+
test_done () {
trap - exit
case "$test_failure" in