X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=4c9f2a2103e32a18c2c14dc257669300ecbe4d6f;hb=57c62c3aeb7cbc61b42e4919230e8f0d77101055;hp=c23a0d209186d7d04bb987614540a366181ac124;hpb=bb15524c12a73e2cd6cdffe0561ba493706d65de;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index c23a0d20..4c9f2a21 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -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 @@ -694,6 +700,22 @@ notmuch_built_with_sanitize () sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/' } +notmuch_passwd_sanitize() +{ + ${NOTMUCH_PYTHON} -c' +import os, sys, pwd, socket + +pw = pwd.getpwuid(os.getuid()) +user = pw.pw_name +name = pw.pw_gecos.partition(",")[0] +fqdn = socket.getfqdn() + +for l in sys.stdin: + l = l.replace(user, "USERNAME").replace(fqdn, "FQDN").replace(".(none)","").replace(name, "USER_FULL_NAME") + sys.stdout.write(l) +' +} + notmuch_config_sanitize () { notmuch_dir_sanitize | notmuch_built_with_sanitize @@ -1117,7 +1139,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 @@ -1270,3 +1292,5 @@ test_declare_external_prereq gpg 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