X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Ftest-lib.sh;h=098d69da347cffc689cb986761421f3ad2444250;hp=29baa0c17d966f0012438aa7d60738778f819a7b;hb=5248f55d5f11c6ed6c2344b2ed13e6ff16fc6dde;hpb=4c79a2dabe38ac72eb9eb21620f2ffca5f1885c6 diff --git a/test/test-lib.sh b/test/test-lib.sh index 29baa0c1..098d69da 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -107,6 +107,9 @@ unset GREP_OPTIONS # For emacsclient unset ALTERNATE_EDITOR +# for reproducibility +unset EMAIL + add_gnupg_home () { [ -e "${GNUPGHOME}/gpg.conf" ] && return @@ -694,6 +697,14 @@ notmuch_built_with_sanitize () sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/' } +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 -e "s/$user/USERNAME/" -e "s/$fqdn/FQDN/" -e "s/$full_name/USER_FULL_NAME/" +} + notmuch_config_sanitize () { notmuch_dir_sanitize | notmuch_built_with_sanitize @@ -1117,7 +1128,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 @@ -1271,3 +1282,4 @@ test_declare_external_prereq openssl test_declare_external_prereq gpgsm test_declare_external_prereq ${NOTMUCH_PYTHON} test_declare_external_prereq xapian-metadata +test_declare_external_prereq xapian-delve