aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-10-27 10:40:44 -0700
committerCarl Worth <cworth@cworth.org>2010-10-27 10:40:44 -0700
commitf30200a4296f972474f9254dc3cba89570cd7bc0 (patch)
tree4a9b8d0f6be720629aad999e419bed3e08c6bc23
parentfad0c3b00b0a38215ddb18f9930d95647a01648c (diff)
test: Set alternate HOME during tests.
We set the HOME environment variable to the test directory to avoid the tests relying on any configuration files from the test author's own home directory, (such as ${HOME}/.emacs or similar).
-rw-r--r--test/test-lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index d9bb254..28d14ef 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -844,7 +844,8 @@ rm -fr "$test" || {
}
MAIL_DIR="${TMP_DIRECTORY}/mail"
-export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
+export HOME="${TMP_DIRECTORY}"
+export NOTMUCH_CONFIG="${HOME}/notmuch-config"
mkdir -p "${test}"
mkdir -p "${MAIL_DIR}"