git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Set $HOME for selftests

From
Gerrit Pape <pape@smarden.org>
Date
Oct 24, 2006, 20:00 UTC
Message-ID
<20061024200037.17087.qmail@d8dab9a84b4add.315fe32.mid.smarden.org>

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>
---
 t/test-lib.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 2488e6e..07cb706 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -207,7 +207,8 @@ # Test the binaries we have just built. 
 # 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.
-- 
1.4.2.3
Message 1 of 1 in “Set $HOME for selftests”
  1. Set $HOME for selftestsGerrit Pape, Oct 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.