]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
emacs: Various cosmetic changes
[notmuch] / test / test-lib.sh
index 58972339bfa05e7e9cf5707b0b1564abf8333025..527c9e8b8eb553aeebad8263716f681f1320a2d5 100644 (file)
@@ -414,7 +414,9 @@ emacs_fcc_message ()
           (message-goto-body)
           (insert \"${body}\")
           $*
-          (notmuch-mua-send-and-exit))" || return 1
+          (let ((mml-secure-smime-sign-with-sender t)
+                (mml-secure-openpgp-sign-with-sender t))
+            (notmuch-mua-send-and-exit)))" || return 1
     notmuch new $nmn_args >/dev/null
 }
 
@@ -556,7 +558,7 @@ test_json_nodes () {
 
        if ! test_skip "$test_subtest_name"
        then
-           output=$(PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON "$TEST_DIRECTORY"/json_check_nodes.py "$@")
+           output=$(PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -B "$NOTMUCH_SRCDIR"/test/json_check_nodes.py "$@")
                if [ "$?" = 0 ]
                then
                        test_ok_
@@ -619,6 +621,11 @@ print(msg.as_string(False))
 ' "$@"
 }
 
+notmuch_exception_sanitize ()
+{
+    perl -pe 's/(A Xapian exception occurred at .*[.]cc?):([0-9]*)/\1:XXX/'
+}
+
 notmuch_search_sanitize ()
 {
     perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/'
@@ -1021,7 +1028,7 @@ export NOTMUCH_CONFIG=$NOTMUCH_CONFIG
 # --load               Force loading of notmuch.el and test-lib.el
 
 exec ${TEST_EMACS} --quick \
-       --directory "$NOTMUCH_SRCDIR/emacs" --load notmuch.el \
+       --directory "$NOTMUCH_BUILDDIR/emacs" --load notmuch.el \
        --directory "$NOTMUCH_SRCDIR/test" --load test-lib.el \
        "\$@"
 EOF
@@ -1081,7 +1088,7 @@ test_python() {
 }
 
 test_ruby() {
-    MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
+    MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT
 }
 
 test_C () {
@@ -1093,7 +1100,7 @@ test_C () {
     echo "== stdout ==" > OUTPUT.stdout
     echo "== stderr ==" > OUTPUT.stderr
     ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr
-    notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr > OUTPUT
+    notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr | notmuch_exception_sanitize > OUTPUT
 }
 
 make_shim () {
@@ -1254,17 +1261,6 @@ test -z "$NO_PYTHON" && test_set_prereq PYTHON
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
 rm -f y
 
-# convert variable from configure to more convenient form
-case "$NOTMUCH_DEFAULT_XAPIAN_BACKEND" in
-    glass)
-       db_ending=glass
-    ;;
-    chert)
-       db_ending=DB
-    ;;
-    *)
-       error "Unknown Xapian backend $NOTMUCH_DEFAULT_XAPIAN_BACKEND"
-esac
 # declare prerequisites for external binaries used in tests
 test_declare_external_prereq dtach
 test_declare_external_prereq emacs