X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=7b49fc9799dac7ed371e4214193d74212cfb84da;hb=f33053023b2a3f42ba7d87e3ed58b58673bf08ad;hp=b89da572e439f57a9c813659b1c7a3c3d8522684;hpb=93e699e5c86bb93b2992f4ab3a15680824b7ee2d;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index b89da572..7b49fc97 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -55,6 +55,9 @@ done,*) ;; esac +# STDIN from /dev/null. EOF for readers (and ENOTTY for tty related ioctls). +exec &1 7>&2 # Make xtrace debugging (when used) use redirected STDERR, with verbose lead: @@ -121,6 +124,7 @@ add_gnupg_home () # Change this if we ship a new test key FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381" SELF_USERID="Notmuch Test Suite (INSECURE!)" + printf '%s:6:\n' "$FINGERPRINT" | gpg --quiet --batch --no-tty --import-ownertrust } # Each test should start with something like this, after copyright notices: @@ -325,7 +329,7 @@ emacs_deliver_message () "(let ((message-send-mail-function 'message-smtpmail-send-it) (mail-host-address \"example.com\") (smtpmail-smtp-server \"localhost\") - (smtpmail-smtp-service \"25025\")) + (smtpmail-smtp-service \"${smtp_dummy_port}\")) (notmuch-mua-mail) (message-goto-to) (insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\") @@ -395,14 +399,8 @@ add_email_corpus () corpus=${1:-default} rm -rf ${MAIL_DIR} - if [ -d $TEST_DIRECTORY/corpora.mail/$corpus ]; then - cp -a $TEST_DIRECTORY/corpora.mail/$corpus ${MAIL_DIR} - else - cp -a $NOTMUCH_SRCDIR/test/corpora/$corpus ${MAIL_DIR} - notmuch new >/dev/null || die "'notmuch new' failed while adding email corpus" - mkdir -p $TEST_DIRECTORY/corpora.mail - cp -a ${MAIL_DIR} $TEST_DIRECTORY/corpora.mail/$corpus - fi + cp -a $NOTMUCH_SRCDIR/test/corpora/$corpus ${MAIL_DIR} + notmuch new >/dev/null || die "'notmuch new' failed while adding email corpus" } test_begin_subtest ()