[PATCH] create and set temporary home directory

Florian Friesdorf flo at chaoflow.net
Mon Apr 18 10:41:39 PDT 2011


My first patch send to the list, not sure whether done properly.

In the master branch in test/emacs two tests access the build users home
directory, so does emacs_deliver_message in the crypto branch.

I think the tests should not touch the build user's home directory. The
patch creates a directory in the temporary test directory and sets home
accordingly.

In case of a non-existent home directory, the tests are failing without
this patch.

---
 test/test-lib.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 9581ead..43dae21 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -923,6 +923,13 @@ rm -fr "$test" || {
 	exit 1
 }
 
+# A temporary home directory is needed by at least:
+# - emacs/"Sending a message via (fake) SMTP"
+# - emacs/"Reply within emacs"
+# - crypto/emacs_deliver_message
+export HOME="${TMP_DIRECTORY}/home"
+mkdir -p "${HOME}"
+
 MAIL_DIR="${TMP_DIRECTORY}/mail"
 export GNUPGHOME="${TMP_DIRECTORY}/gnupg"
 export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
-- 
1.7.4.4





-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC


More information about the notmuch mailing list