1 Return-Path: <dmitry.kurochkin@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id E6CED429E5A
\r
6 for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:52 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id D4vHHf-EjGHL for <notmuch@notmuchmail.org>;
\r
17 Mon, 27 Jun 2011 21:45:52 -0700 (PDT)
\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com
\r
19 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 743FC429E4F
\r
22 for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:48 -0700 (PDT)
\r
23 Received: by mail-bw0-f53.google.com with SMTP id 12so4889638bwg.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:48 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer
\r
27 :in-reply-to:references;
\r
28 bh=h9cKKZlPlt9rSWT6ty29oEmYh2+xmj9zuMK2JGdj26I=;
\r
29 b=OGuK0iE1ypE0GT0rdQ8LEgCTPk3VlotRR4nMPsbsAoQY5whjc16pkh2UOW+XP+5hSd
\r
30 cYgO+TW6a/0asadGgH0OQEit7O7TM6k8ZndvF/y5Xd4pLVba+1jgY2WB0YBj730ASfpE
\r
31 s0CHo5/41DC2YS/lUy6gYVsMyvv4QD+eLjMbI=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
34 b=B2Q4kcpfQNgZCpOxjw7HBMdYVcNacLqTc4kRzv5l3gjt51JKWlClnFim2uJz92iI4Y
\r
35 wflsSUj+ppq0eu5gGSNhaD5YYxOq3RErdWyu7HVEZOcAESye950Za1DdU7+1WJIeaU4f
\r
36 ywiNZdk7LeIC83jqTnKCnLFgz1Jn4Z2OaetIc=
\r
37 Received: by 10.204.19.19 with SMTP id y19mr4985846bka.164.1309236348166;
\r
38 Mon, 27 Jun 2011 21:45:48 -0700 (PDT)
\r
39 Received: from localhost ([91.144.186.21])
\r
40 by mx.google.com with ESMTPS id g13sm2876238bkd.10.2011.06.27.21.45.47
\r
41 (version=TLSv1/SSLv3 cipher=OTHER);
\r
42 Mon, 27 Jun 2011 21:45:47 -0700 (PDT)
\r
43 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
44 To: notmuch@notmuchmail.org
\r
45 Subject: [PATCH 09/10] test: generate run_emacs script once on test startup
\r
46 Date: Tue, 28 Jun 2011 08:45:10 +0400
\r
47 Message-Id: <1309236311-2162-9-git-send-email-dmitry.kurochkin@gmail.com>
\r
48 X-Mailer: git-send-email 1.7.5.4
\r
49 In-Reply-To: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
50 References: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Tue, 28 Jun 2011 04:45:53 -0000
\r
65 Instead of generating auxiliary run_emacs script every time
\r
66 test_emacs is run, do it once in the beginning of the test.
\r
68 Also, use absolute paths in the script to make it more robust.
\r
70 test/test-lib.sh | 17 +++++++++++------
\r
71 1 files changed, 11 insertions(+), 6 deletions(-)
\r
73 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
74 index 7c8a86f..48bace2 100755
\r
75 --- a/test/test-lib.sh
\r
76 +++ b/test/test-lib.sh
\r
77 @@ -839,11 +839,11 @@ test_done () {
\r
82 +emacs_generate_script () {
\r
83 # Construct a little test script here for the benefit of the user,
\r
84 # (who can easily run "run_emacs" to get the same emacs environment
\r
85 # for investigating any failures).
\r
86 - cat <<EOF > run_emacs
\r
87 + cat <<EOF >"$TMP_DIRECTORY/run_emacs"
\r
90 export NOTMUCH_CONFIG=$NOTMUCH_CONFIG
\r
91 @@ -867,12 +867,15 @@ fi
\r
92 # --load Force loading of notmuch.el and test-lib.el
\r
94 emacs \$BATCH --no-init-file --no-site-file \
\r
95 - --directory ../../emacs --load notmuch.el \
\r
96 - --directory .. --load test-lib.el \
\r
97 + --directory "$TMP_DIRECTORY/../../emacs" --load notmuch.el \
\r
98 + --directory "$TMP_DIRECTORY/.." --load test-lib.el \
\r
99 --eval "(progn \$@)"
\r
101 - chmod a+x ./run_emacs
\r
103 + chmod a+x "$TMP_DIRECTORY/run_emacs"
\r
107 + "$TMP_DIRECTORY/run_emacs" "$@"
\r
111 @@ -1000,6 +1003,8 @@ primary_email=test_suite@notmuchmail.org
\r
112 other_email=test_suite_other@notmuchmail.org;test_suite@otherdomain.org
\r
115 +emacs_generate_script
\r
118 # Use -P to resolve symlinks in our working directory so that the cwd
\r
119 # in subprocesses like git equals our $PWD (for pathname comparisons).
\r