Set $HOME for selftests
authorGerrit Pape <pape@smarden.org>
Tue, 24 Oct 2006 20:00:37 +0000 (20:00 +0000)
committerJunio C Hamano <junkio@cox.net>
Tue, 24 Oct 2006 21:38:46 +0000 (14:38 -0700)
Set HOME environment variable to test trash directory and export for
selftests. This fixes the git-svn selftests with nonexistent or not
readable home, as found in at least one automated build system:

http://buildd.debian.org/fetch.cgi?&pkg=git-core&ver=1%3A1.4.2.3-2&arch=alpha&stamp=1161537466&file=log

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/test-lib.sh
index 2488e6eae1f515baa3adcaceca75000d15976612..07cb706fa8a241bf707b91d033ea0c5c876d9307 100755 (executable)
@@ -207,7 +207,8 @@ test_done () {
 # t/ subdirectory and are run in trash subdirectory.
 PATH=$(pwd)/..:$PATH
 GIT_EXEC_PATH=$(pwd)/..
-export PATH GIT_EXEC_PATH
+HOME=$(pwd)/trash
+export PATH GIT_EXEC_PATH HOME
 
 # Similarly use ../compat/subprocess.py if our python does not
 # have subprocess.py on its own.