]> git.notmuchmail.org Git - notmuch/commitdiff
test: Set alternate HOME during tests.
authorCarl Worth <cworth@cworth.org>
Wed, 27 Oct 2010 17:40:44 +0000 (10:40 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 27 Oct 2010 17:40:44 +0000 (10:40 -0700)
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).

test/test-lib.sh

index d9bb2541bdc907c877162628befc51de1ccc091b..28d14ef96aaa6965c5bbc8eedd963ad2928d5401 100644 (file)
@@ -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}"