# to the message and encrypting/signing.
emacs_deliver_message () {
local subject body smtp_dummy_pid smtp_dummy_port
+ test_subtest_broken_for_installed
subject="$1"
body="$2"
shift 2
(message-goto-body)
(insert \"${body}\")
$*
- (notmuch-mua-send-and-exit))"
-
+ (let ((mml-secure-smime-sign-with-sender t)
+ (mml-secure-openpgp-sign-with-sender t))
+ (notmuch-mua-send-and-exit)))"
# In case message was sent properly, client waits for confirmation
# before exiting and resuming control here; therefore making sure
# that server exits by sending (KILL) signal to it is safe.
# Construct a little test script here for the benefit of the user,
# (who can easily run "run_emacs" to get the same emacs environment
# for investigating any failures).
+ if [ -z "${NOTMUCH_TEST_INSTALLED-}" ]; then
+ find_notmuch_el='--directory "$NOTMUCH_BUILDDIR/emacs"'
+ else
+ ### XXX FIXME: this should really use the installed emacs lisp files
+ find_notmuch_el='--directory "$NOTMUCH_SRCDIR/emacs"'
+ fi
+
cat <<EOF >"$TMP_DIRECTORY/run_emacs"
#!/bin/sh
export PATH=$PATH
#
# --load Force loading of notmuch.el and test-lib.el
-exec ${TEST_EMACS} --quick \
- --directory "$NOTMUCH_BUILDDIR/emacs" --load notmuch.el \
+exec ${TEST_EMACS} ${find_notmuch_el} --quick \
+ ${EXTRA_DIR} --load notmuch.el \
--directory "$NOTMUCH_SRCDIR/test" --load test-lib.el \
"\$@"
EOF
${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(notmuch-test-progn $*)"
}
+time_emacs () {
+ rm -f MESSAGES
+ printf "%s" "$1"
+ shift
+ test_emacs "(test-time $*)" > emacs.out
+ tail -n 1 MESSAGES
+}
+
emacs_generate_script