]> git.cworth.org Git - notmuch/blobdiff - test/test-lib.sh
update version to 0.32~rc0
[notmuch] / test / test-lib.sh
index fa2e401eb9ff0374b4ca62dedc9fc5ef4f1fd4e4..3f8d58277dc1b5b550da51826d4cf2365276cf27 100644 (file)
@@ -104,9 +104,15 @@ unset CDPATH
 
 unset GREP_OPTIONS
 
+# For lib/open.cc:_load_key_file
+unset XDG_CONFIG_HOME
+
 # For emacsclient
 unset ALTERNATE_EDITOR
 
+# for reproducibility
+unset EMAIL
+
 add_gnupg_home ()
 {
     [ -e "${GNUPGHOME}/gpg.conf" ] && return
@@ -697,8 +703,9 @@ notmuch_built_with_sanitize ()
 notmuch_passwd_sanitize ()
 {
     local user=$(id -un)
+    local fqdn=$(hostname -f)
     local full_name=$(getent passwd $user | cut -d: -f 5 | cut -d, -f1)
-    sed "s/$full_name/USER_FULL_NAME/"
+    sed -e "s/$user/USERNAME/" -e "s/$fqdn/FQDN/" -e "s/$full_name/USER_FULL_NAME/"
 }
 
 notmuch_config_sanitize ()
@@ -1124,7 +1131,7 @@ notmuch_with_shim () {
     base_name="$1"
     shift
     shim_file="${base_name}.so"
-    LD_PRELOAD=./${shim_file}${LD_PRELOAD:+:$LD_PRELOAD} notmuch-shared "$@"
+    LD_PRELOAD=${LD_PRELOAD:+:$LD_PRELOAD}:./${shim_file} notmuch-shared "$@"
 }
 
 # Creates a script that counts how much time it is executed and calls