--- /dev/null
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 36C11431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 19:37:16 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Gj7-xp6Ga2Lr for <notmuch@notmuchmail.org>;\r
+ Sat, 28 Jan 2012 19:37:15 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+ [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 85D62431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 19:37:15 -0800 (PST)\r
+Received: by bke11 with SMTP id 11so412812bke.26\r
+ for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 19:37:12 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=from:to:subject:date:message-id:x-mailer;\r
+ bh=IWDKpoOKiVYKfL1NE5baAXbX3aD+b9r6gnQUFL2Tn5w=;\r
+ b=U28ZKvc6wCOtt0iYsBE9LPHIysFbAVKuhJKur/DS2oZC0xm6J4fm+b25gS4HO/Vbv9\r
+ 61FawPAMa//AsChKd2Dj2XyBmJz6aRf4T/AJmqCvVIPAUjfTFGGaSrV4GAH18R4txecx\r
+ aK44Vz/2npPSVVlHBFgMD3LvLHEwBaem6C81E=\r
+Received: by 10.205.132.1 with SMTP id hs1mr5698976bkc.45.1327808232690;\r
+ Sat, 28 Jan 2012 19:37:12 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+ by mx.google.com with ESMTPS id d2sm27445167bky.11.2012.01.28.19.37.11\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sat, 28 Jan 2012 19:37:12 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] test: auto load elisp tests file in test_emacs if\r
+ available\r
+Date: Sun, 29 Jan 2012 07:36:02 +0400\r
+Message-Id: <1327808163-31483-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.8.3\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 29 Jan 2012 03:37:16 -0000\r
+\r
+This allows us to simplify shell part of tests written in elisp.\r
+---\r
+ test/test-lib.sh | 7 +++++++\r
+ 1 files changed, 7 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index 8158328..0174e93 100644\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -943,6 +943,12 @@ test_emacs () {\r
+ test -z "$missing_dependencies" || return\r
+ \r
+ if [ -z "$EMACS_SERVER" ]; then\r
++ emacs_tests="$(basename $0).el"\r
++ if [ -f "$TEST_DIRECTORY/$emacs_tests" ]; then\r
++ load_emacs_tests="--eval '(load \"$emacs_tests\")'"\r
++ else\r
++ load_emacs_tests=\r
++ fi\r
+ server_name="notmuch-test-suite-$$"\r
+ # start a detached session with an emacs server\r
+ # user's TERM is given to dtach which assumes a minimally\r
+@@ -950,6 +956,7 @@ test_emacs () {\r
+ TERM=$ORIGINAL_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \\r
+ sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \\r
+ --no-window-system \\r
++ $load_emacs_tests \\r
+ --eval '(setq server-name \"$server_name\")' \\r
+ --eval '(server-start)' \\r
+ --eval '(orphan-watchdog $$)'" || return\r
+-- \r
+1.7.8.3\r
+\r